
Values and see the action! “window” commandĮnsures that the drawing does not wrap around and Recursion Click on Examples in and see last 2: fern & tree to drawPattern :level if :level > 0 end cs window setpensize 2 drawPattern 3 Change the argument for drawPattern to higher Write your own procedures and use them in interesting ways!ġ3. to circle : dist repeat 360 end TO circles :count : dist repeat :count end pd setpensize 2. Utilize the following procedures to draw these images and more. To star make "size 20 + random 20 repeat 5 END cs home window repeat 100 To star make "size random 40 repeat 5 END cs home repeat 100

To star :size repeat 5 END cs home make "size 40 while :size > 1 To circle :radius arc 360 :radius end make "rad 200 cs setpensize 2 while :rad > 0 (or) to circle :radius if :radius > 3 end make "rad 200 cs setpensize 2 repeat 1000 To triangle :size repeat 3 end cs setpensize 2 setpencolor random 16 pu setxy 25 0 pd make "size 200 while :size > 0 pu home setxy -25 0 pd lt 60 make "size 200 while :size > 0 To square :size repeat 4 end cs repeat 36 Ĭs make "size 200 repeat 36 Ĭs make "size 200 setpensize 2 repeat 36 Ĭs make "size 200 setpensize 2 setpencolor random 16 while :size > 0 Our own Procedures - We can write our own procedures in Logo, then use them like in-built functions! Create your own artistic creations using the power of Variables!ġ1. cs setpensize 2 make "angle 0 repeat 10 Ĭs setpensize 2 make "angle 0 repeat 45 Ĭs setpensize 2 make "angle 0 repeat 500 Ĭs pu setpensize 2 setxy -200 -100 repeat 4 Ĭs make "angle 0 repeat 25 Ĭs repeat 20 rt random 360 ]Ĭs make "size 250 setpensize 1 repeat 10 Ĭs make "size 10 repeat 50 Ĭs make "size 10 repeat 60 Ĭs rt 90 setpensize 2 setpencolor random 16 make "size 1 repeat 60 Ĭs setpensize 2 setpencolor random 16 make "turn 0 while :turn < 360 pu home pd make "turn :turn + 60 rt :turn ]Ĭs setpensize 2 make "turn 0 while :turn < 360 pu home pd lt :turn make "angle 0 while :angle < 180 pu home pd make "turn :turn + 120 rt :turn ]ġ0. Logo Variables print :variable can be used to print the values on screen. random function cs repeat 30 Ĭs setpensize 5 repeat 30 Ĭs repeat 10 ĩ.

Let your creativity run wild and try a few colored picures of your own! 8. set pen size and fill color cs setpensize 50 arc 180 100 rt 180 arc 180 50Ĭs setpensize 20 arc 180 15 setpensize 50 arc 180 100 rt 180 arc 180 50Ĭs setpensize 20 setpencolor 4 arc 180 15 setpencolor 1 setpensize 50 arc 180 100 rt 180 setpencolor 2 arc 180 50Ĭs setpencolor 4 arc 360 100 fill setpencolor 1 arc 360 75 fill setpencolor 5 arc 360 50 fillĬS SETPENCOLOR 12 REPEAT 4 PU RT 45 FD 25 FILL BACK 100 PD LT 45 REPEAT 4 RT 45 FD 25 SETPENCOLOR 1 FILLħ.

arc function to draw circle OR part of a circle. Sets position of turtle to new values of X and YĬreates arc enclosed in angle 90 with radius 50Ĥ.

Resets the turtle to centre of the screen Put the turtle pen back down on the paper. Website stores your session history and saves your procedures to be re-used.īox in the bottom of the page looks like this:Ĭan issue the following commands and see them in action! Language to move a ‘turtle’ over the surface A Program is a set of instructions to the computer to do a specific
