Origen
Carpetas de Proyectos
Recursos de Profesores
Recursos de Estudiantes
En INGLÉS
¿Cómo hago?
Lectura
Foro MW
Mapa del Sitio
Búsqueda
Equipo

espirales 1 2 3 4 5 6 7 8 9
Espirales 9
Pruébalo
51 KB


Meta:   Explora variaciones de espirales con recursión internal.


Screenshot


Código
Mapa del Proyecto

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



Notas

Este proyecto demuestra tres posibles variaciones del procedimiento espiral para obtener efectos interesantes con recursión interna.   No existen límites a las posibilidades.




¿Qué pasa si?
Intenta diferentes valores en los controles con estas tres variantes.


Desafío
Crea una o más variaciones por tu cuenta.




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