[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> Re: Shortest Fractal



Thank you, M.H. Elhefni, for the short fractals.

define "s [[l][if :l> 10 [repeat 5[fd :l s :l/2 rt 144]]] s 150

define "s [[l][if :l> 10 [repeat 5[fd :l s :l/2 rt 72]]] s 100

According to my count, these are 19 words.
I count both the procedure definition (17 words)
and the command to run the procedure (2 words).
These are are shorter than my 21 word fractal tree.

19 words! Only 4 words away from the magic 15!
How can it be made shorter?
Perhaps there is a way to eliminate the "if" test so that
the program never ends, but still draws a fractal.
Perhaps there is a way to make a "good" fractal using
only nested repeats, and avoiding recursion.
Perhaps there is an undocumented primitive
in MSW Logo named MANDELBROT. :-)

- 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