MODULE Pythagoras_Example{ CLS 5, 0 ' MAGENTA, split line = 0 PEN 14 ' YELLOW \\ Linux smoothing not work (we can use the statement but without effect) IF ISWINE ELSE SMOOTH ON \\ PYTHAGORAS TREE \\ by definition all variables ar type of a double GLOBAL p=7, p4=PI/4, p2=PI/2, s2=SQRT(2)/2 MODULE center_p (r, t){ MODULE pythagoras_tree (r, dx, depth) { r2=r-p2 DRAW ANGLE r, dx DRAW ANGLE r2, dx DRAW ANGLE r, -dx DRAW ANGLE r2, -dx IF depth>10 THEN EXIT s3=dx*s2 depth++ STEP ANGLE r+p4, s3*2 CALL pythagoras_tree r-p4, s3, depth STEP ANGLE r, -dx-s3 STEP ANGLE r, s3 STEP ANGLE r+p4, -s3 CALL pythagoras_tree r+p4, s3, depth STEP ANGLE r-p4, s3 } MOVE SCALE.X/2, SCALE.Y/2 STEP ANGLE PI-p4+r, t*s2 CALL pythagoras_tree r, t, 1 } r=PI/3 pixels=100 center_p r, 100*TWIPSX center_p r+PI, 100*TWIPSX CopyImageToClipboard() Sub CopyImageToClipboard() LOCAL Scr$="" MOVE 0,0 COPY SCALE.X, SCALE.Y TO Scr$ CLIPBOARD Scr$ END SUB } Pythagoras_Example