block by nitaku c3d1662948a049fc80dd

Hex spiral (L-system)

Full Screen

A Lindenmayer system that draws a spiral on a hexagonal tiling, starting from its center. See also a square one.

As in the previous experiment, the X -> XF rule takes into account the growth in length of the spiral sides. The Y -> Y+XF+X+XF+XF+XF+XF rule describes the concatenation of full turns of the spiral (note that the second side is always one unit shorter than the others - just look at the top-left part of the figure to see that).

index.js

index.html

index.coffee

index.css