Copyright © University of Cambridge. All rights reserved.

'Flower Power' printed from https://nrich.maths.org/

Show menu

Logo flower designThis is the program I used for the basic design in the image.  You could copy it and adapt it if you wish (you may not need 'To' or 'end', this will depend on which version of Logo you are using).

The program consists of four Logo Procedures:

To petal 
ht lt 40 repeat 16[fd 4 rt 5] rt 100 repeat 16[fd 4 rt 5] rt 140 end

To flower
repeat 5[petal rt 72] end

To strip
repeat 5[flower pu fd 128 pd] end

To fabric
pu lt 90 fd 300 rt 90 bk 300 pd repeat 5[strip pu rt 90 fd 120 lt 90 bk 560 pd] end
 
Logo commands
ht = hide turtle
lt - left
fd = forward
rt = right
pu = pen up
pd = pen down
bk = back
 

Can you see what each program and each command is doing?  
The forward distance of 4 pixels was chosen to give a sensible size of petal.  What happens if you change it?
Similarly the angle change of 5 degrees seemed to give a good result.  What happens if you change this?  And how do you have to change the other angles and the number of repeats if you change it?
The forward and backward instructions in To fabric at the beginning and at the end of the repeat were chosen fairly arbitrarily to give an effective design.
 

Generalising the program

You can generalise the petal size and hence the size of the finished design by using a variable instead of the length of 4.
See if you can work out how to do this: help in using variables.
Can you then generalise for the number of petals in the flower?