Drawing a whole flower

Page 17

Look at this picture:

A flower

Does it look familiar? It's built with the leaves from the previous page. Can you draw it? Try to Think Turtle.

Here's how I drew it. First I made LEAF take a parameter. Like this:

TO LEAF :x
  REPEAT 2 [CIRCLE 100 :x RT 80]
END

That's just because I wanted a bigger bloom. You could do it with the old LEAF too. Then I drew the bloom like this:

REPEAT 12 [RT 30 LEAF 2]

Let's call it BLOOM:

TO BLOOM
  REPEAT 12 [RT 30 LEAF 2]
END

(Can you make a bloom with more petals? With less petals? Can you make BLOOM 4 mean a bloom with 4 petals?)

Now you can draw a whole flower. Maybe it could look like this?:

A flower

You don't need my help to draw that. You can do it all on your own.

These are the words we know now. They are the same as on the last page:

Logo word What it means
FD 100 Walk forward 100 steps
BK 100 Walk backward 100 steps
LT 90 Turn left (good for drawing squares)
RT 90 Turn right (good for drawing squares)
LT 120 Turn left (good for drawing triangles)
RT 120 Turn right (good for drawing triangles)
CS Remove everything you have drawn
HOME Move back to the starting point (and draw a line)
PU Lift the pen so you won't draw when you walk
PD Put the pen towards the screen again
REPEAT 10 [       ] Repeat what's in the box 10 times
SETPC 4 Change the pen to pen number 4
TO ... END Remember the word after TO in the future
; Don't listen to me now
PRINT [I'm a turtle!] Say "I'm a turtle!"
RANDOM 10 Choose a number from 0 to 9
WAIT 60 Wait for 1 second.
PRINT 2+2 Makes the turtle say 4
TO SQUARE :top Put 5 in your :top pocket when I say SQUARE 5
REPCOUNT The number of the repetition

These are the words we have taught the turtle. BLOOM is new:

New Logo word What it means
SQUARE :top Draw a square
CIRCLE :x :size Draw a circle
STAR :number :length Draw a star
LEAF Draw a leaf
BLOOM Draw a bloom

Turn page, or back to the table of contents.