Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

spirals 1 2 3 4 5 6 7 8 9
Spirals 9
Screenshot
Turtle Face Get Web Player
  if you cannot see the project


Goal:   Explore spiral variations with embedded recursion.




Code
Project Map

to spiral1 :length :pitch
pd
if :length > howbig [stop]
setc whatcolor
setpensize howthick
fd :length rt angle
carefully [note :pitch 3] [ ]
spiral1 :length + howtight :pitch - 1
fd :length lt angle
carefully [note :pitch 3] [ ]
end

to spiral2 :length :pitch
pd
if :length > howbig [stop]
setc whatcolor
setpensize howthick
fd :length rt angle
carefully [note :pitch 3] [ ]
spiral2 :length + howtight :pitch - 1
setc color + 1
fd :length lt angle
carefully [note :pitch 3] [ ]
end

to spiral3 :length :pitch
pd
if :length > howbig [stop]
setc whatcolor
setpensize howthick
fd :length rt angle
carefully [note :pitch 3] [ ]
spiral3 :length + howtight :pitch - 1
rt 180
setc whatcolor + 20
carefully [setpensize howthick - 1] [ ]
fd :length lt angle
carefully [note :pitch 3] [ ]
end

to reset
cg
end



Notes

This project demonstrates three possible variations of the spiral procedure to get interesting effects with embedded recursion.   There are limitless possibilities.




What If?
Try different slider settings with these three variations.


Challenge
Create one or more variations of your own.




© copyright 2001 - 2008  OpenWorld Learning.   All rights reserved.