Hilbert Curve, Koch Snowflake

 From:  bemfarmer
6441.1 
After a lot of study, here is a Hilbert Curve generating script, using recursion.
Two related references:

http://fundza.com/algorithmic/space_filling/hilbert/basics/index.html
http://www.donrelyea.com/hilbert_algorithmic_art_menu.htm

Amazingly, the JavaScript recursion worked. I had to pass the factory as a variable, which I have not seen done before.
It takes about 2 minutes to generate the 8th curve. Did not try 9 or more. May try to transfer some code to .htm file, for speed, to see if it will work.

The Hilbert Curve is used a great deal in various computer and software situations. It is a map from a 1 dimension line, to 2 dimensions.

- Brian

The Koch Snowflake is next. The recursion seems very similar, from a template standpoint.
Attachments: