void setup () { size (600,600); } void draw () { background (255,255,255); tr (300,300,100); } void tr ( int x, int y, int a ) { int x1=x-round(a*cos(PI*30/180)); int y1=y-round(a*sin(PI*30/180)); int x2=x-round(a*cos(PI*150/180)); int y2=y-round(a*sin(PI*150/180)); int x3=x-round(a*cos(PI*270/180)); int y3=y-round(a*sin(PI*270/180)); line (x1,y1,x2,y2); line (x2,y2,x3,y3); line (x3,y3,x1,y1); int x4=x+round(a*cos(PI*30/180)); int y4=y+round(a*sin(PI*30/180)); int x5=x+round(a*cos(PI*150/180)); int y5=y+round(a*sin(PI*150/180)); int x6=x+round(a*cos(PI*270/180)); int y6=y+round(a*sin(PI*270/180)); if (a>0) { tr (x4,y4,a/2); tr (x5,y5,a/2); tr (x6,y6,a/2); } }