My 90's code: Harter Heigthway Dragon

This is a fractal createed by the outline of paper folds, when the paper is folded in the same direction repeatedly and folds are opened halfway (90 deg). For example a single fold will look like "L" and two folds will look like two L's glued together to make a single continous line. As we increase folds, an interesting fractal pattern develops that looks like a Chinese dragon. More information about this fractal curve is available at Wikipedia.

I wrote the C code for this in 1995 and later ported it to Java in 2000. What's cool about this problem is, there are multiple ways to implement the algorithm and some interesting ways to optimize or parallelize it, owing to the pure simplicity and symmetry of the problem. The code is available at my GitHub repo