Origen
Carpetas de Proyectos
Recursos de Profesores
Recursos de Estudiantes
En INGLÉS
¿Cómo hago?
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
if :length > howbig [stop]
pd
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
if :length > howbig [stop]
pd
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
if :length > howbig [stop]
pd
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.


Por tu cuenta - Ideas para Proyectos
Ahora que conoces un poquito de recursión interna, crea un nuevo procedimiento con recursión interna.   No es necesario que tenga algo que ver con dibujar espirales.   Podría usar animación o palabras, por ejemplo.





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