[MWForum]re: Koch snowflake
Pavel Boytchev
mwforum@lists.mathcats.com
Tue, 15 Jul 2003 02:55:14 +0300
Wendy Petti wrote:
> There is a simpler MW code for the snowflake, below.
> to side :length? :level?
> ...
> end
Dear Wendy, there is even a simpler solution. Instead of having LENGTH and LEVEL, you can use only LENGTH. In this case the test condition for the end of the recursion can be:
if less? :length? :minlength [...]
where MINLENGTH contains the minimal segment length under which there is no recursion (i.e. no further breaking into smaller triangles). However, for demonstration purposes, and to show how the snowflake fractal develops, the use of LEVEL is quite very helpful.
Pavel