Paolo Passaro sent me the following: << I am a teacher and I use Logo in my schoolroom with my students. but these are only my tests. Student of 6-8 grades does not do trigonometry. ; five_rose repeat 1800 [rt repcount fd 10 lt repcount fd 5 rt repcount rt .1] ; ten_rose repeat 3600 [rt repcount fd 10 lt repcount fd 1 rt repcount rt .2] ; The first 14-word command draws five roses around a five arcs, ; the second one draws ten roses around ten arcs. ; There is a repeat of 1800 times against a final right 0.1, while in ; the second there is a repeat of 3600 times against a right 0.2, now ; I ask what is the relation between 1800,0.1 and 3600,0.2. ; What numbers I get (->1800/0.1) for drawing a six or a eight roses ; picture? ; Here is some variations of spirals: ; Eye: repeat 1800 [fd ln repcount bk 10*sin repcount rt 10] ; growing repeat 360 [repeat repcount [repeat repcount [fd repcount lt 15] home] lt 1] ; DonChisciotte (Don Quixote) px repeat 360 [repeat repcount [repeat repcount [fd repcount lt 15] home] lt 1] ; And this is a 14-word command to draw circles and ellipses: repeat 360 [rt repcount fd 1 lt repcount*2 fd 0.5 rt repcount] ; The value e=0.5 is responsible for it all (see Abelson-Di Sessa: ; "Turtle geometry", about how it works) ; it is the 'eccentricity' of the curve: if e=0 you have a circle and ; if e<0 or e>0 you have an ellipse (horizontal or vertical). ;Finally these are variations on polygons: repeat 4 [repeat 30 [lt 90 fd 4 rt 90 fd 4] rt 90] repeat 4 [repeat 20 [lt 160 fd 20 rt 160 fd 20] rt 90] repeat 8 [repeat 20 [lt 170 fd 20 rt 170 fd 20] rt 45] About legal/illegal instruction in one-line challenge I think that the suggested mode grants the instruction "for [...]" while it is not a primitive in most Logo dialects. Even 'repcount' is not available, but I have used it. Somebody can tell me how to reduce this procedure to a 15-word command? define "tt [[l n][ifelse :n<1 [fd :l rt 120 stop] [repeat 3 [fd :l/2 rt 120 tt :l/2 :n-1 fd :l/2 rt 120]]] tt 300 6 My english might be wrong, please correct it for me. Thank you. Paolo Passaro Biella, Italy paspal@bienet.it >> These are great one-liners. I replied to the last question as follows: I'm sorry I cannot reduce the last fractal to 15 words. We have been trying to make a real fractal in 15 words, but we have not succeeded yet. We can make a triangle fractal similar to yours in 19 words (based on a fractal from M.H. Elhefni): define "s [[l][if :l > 5 [repeat 3 [fd :l s :l/2 rt 120]]] s 100 - Keith Enevoldsen --------------------------------------------------------------- Please post messages to the Logo forum to logo-l@gsn.org. Mail questions about the list administration to logofdn@gsn.org. To unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home