moltenform
Home
Previous: Microsoft
Previous: Microsoft
Drawdraw
Drawdraw
Next: FPGA
Next: FPGA

Drawdraw

(from a blog post I wrote in 2010, halfhourhacks 2010-11-06-drawdraw.html)

Drawdraw is a web app for drawing recursive shapes and patterns.

Source code is on GitHub, released under the GPLv3.

Click on this link to try it!


Instructions: Click the buttons to make things. Drag the green dots to move things. Experiment until it looks cool, then hit the floppy disk icon to save a link.


The light-blue arrow in the background represents the initial scale and rotation. At every step, the orange arrows are replaced with a scaled and rotated copy of the figure. If an orange arrow is longer than the light-blue arrow, the figure "explodes" because the size increases with every step.

I wrote this as a JavaScript port of an old Python program I wrote years ago. I invented this user interface to show intuitively that this type of fractal is an image that contains smaller copies of itself. The end goal is to build a tool that can draw any self-similar shape... I wonder how to make a non-linear version...

In the end, if enough steps are done (the pencil+ button adds more steps), look at the result - the location where each orange arrow will contain the entire figure (picture a tree, where each branch can have the form of the entire tree). It is self-similar, a property held by fractals. Because this program represents a set of affine mappings, it can be used to draw all of the traditional IFS fractals.

Have fun!

Back