reload
language code

example code A

to sierpinski :n :length if :n = 0 [stop]

repeat 3 [sierpinski :n-1 :length/2 fd :length rt 120]

end seth 30 sierpinski 5 200

example code B

cs ct pu rt 225 fd 15 rt 135 pd repeat 75 [fd 20 rt 121 fd 30 rt 122]

mandelbrot code tree code

nav

Your browser does not support the canvas element - sorry!
Run
Stop
Clear
Basic Commands Forward e.g. forward 200 [makes a line 200] Back e.g. back 100 [goes back 100] Right e.g. right 90 [turtle turns right through a 90 degree angle] Left e.g. left 45 [turtle turns left through a 45 degree angle] PenUp PenDown HideTurtle ShowTurtle Penerase PenPaint HideTurtle Abbreviated commands for the list above (these can be typed into the command window) FD 200 BK 100 RT 90 LT 90 PU PD HT ST PE PPT CS Commands for basic 2-D shapes Square Repeat 4 [fd 200 rt 90] Rectangle Fd 300 rt 90 fd 150 rt 90 Fd 300 rt 90 fd 150 rt 90 Circle Repeat 360 [fd 3 rt 1] Triangle Repeat 3 [fd 300 rt 120] Pentagon Repeat 5 [fd 200 rt 72] Hexagon Repeat 6 [fd 200 rt 60 Octagon Repeat 8 [fd 150 rt 45] Nonagon Repeat 9 [fd 150 rt 40] โ€‹ Decagon Repeat 10 [fd 100 rt 36]