The Grand Prize (the Golden Turtle)
Five Rose or Starfish
repeat 1800 [fd 10 rt repcount + .1]
Paolo Passaro submitted the original longer version, and then Julie Clune and he submitted shorter, simpler versions. [See the original code at the bottom of this page.]
This is very beautiful and very simple.
There are variations, such as Ten Rose:
repeat 3600 [fd 10 rt repcount + .2]
Paolo Passaro provides a general procedure.
Try this:
MicroWorlds version:
repeat 1800 [rt repcount fd 10 lt repcount fd 5 rt repcount rt .1]
repeat 1800 [rt 1 fd 10 lt repcount rt .1] (MSW Logo)
These look very similar but are slightly different.
dotimes [i 1800] [fd 10 rt :i + .1] (MicroWorlds)
(This composite GIF was created by Yehuda Katz.)
This is only EIGHT words!
It is one of the shortest entries in the contest.
dotimes [i 1800] [fd 10 rt :i + .1] (MicroWorlds)
It is interesting to figure out the formula.
to roses :l :n :k
local "x
make "x (2 * :k - :n) / (2 * :n)
repeat 360 * :n [fd :l rt repcount + :x]
end
:l is the step size
:n is the number of "roses"
:k is the order
roses 5 5 3
roses 5 7 3
roses 5 10 7
roses 5 12 5 to roses :l :n :k
local "x
make "x (2 * :k - :n) / (2 * :n)
dotimes [i 360 * :n] [fd :l rt :i + :x]
end
* * * * *
Original entries:
Paolo Passaro submitted Five Rose, 14 words:
Julie Clune submitted a variation named Starfish, 10 words:
dotimes [i 1800] [rt 1 fd 10 lt :i rt .1] (MicroWorlds)
Five Rose is crinkly; Starfish is smooth.
Both are very beautiful.
math cats' mailroom |