Pretty SVG quasicrystal generator

Quite a long while back I had found Eric Weeks’ quasi.c, a small and fast quasicrystalline pattern generator. I recall having quite some fun throwing random options at it and looking at the pretty patterns it made. But C and PostScript are only so much fun for so long, and so I thought of it no more.

I recently stumbled upon the same again, and thought I might just port it to JavaScript, and have it output SVG instead of PostScript. I ported it pretty brutally, not changing the code much at all. It has a few rough edges, but it works. This is the result, embedded in the browser for your lazy viewing pleasure.

Note that some options only work together (but I was too lazy to get the form to properly reflect that). The Fat midpoint only does something if the Skinny midpoint is set. Setting Colours implies Varying, and setting Varying implies Fill.

I think there is a bug with symmetries that are multiples of four. But then again the point here isn’t to be correct, it’s just to be able to generate pretty things.

If you like it you can get the code on GitHub or grab it from npm as quasi-svg.