Dragon curve from paper folding sequence
Dragon curves, the binary paper folding sequence , actual paper folding.
Which is pretty easy to fold the wrong way.
I have made this curve using L-systems before, this time I have made it with the binary paper folding sequence. This is the 12th iteration and it is a binary number with 4095 digits.
If it is a "1" the turtle goes left, if "0" the turtle goes right.
I read Jurassic park, I didn't remember this curve was in the book. Some good Numberphile videos about it too.
I am not generating the paper folding sequence in the sketch.
I have the paper folding sequence for the 12 iteration which has 4095 binary digits.
I can get any level from one to 12 by taking (2^N)-1. The paper folding sequence for level 3 is (2^3)-1 = 7 digits long.
see it live:
https://greggelong.github.io/paperDragon
the level is mapped to the mouse X movement
A day is like a whole life. You start out doing one thing, but end up doing something else, plan to run an errand, but never get there... And at the end of your life, your whole existence has that same haphazard quality, too. Your whole life has the same shape as a single day.” ― Michael Crichton, Jurassic Park
I found these resources the most helpful: https://mathworld.wolfram.com/DragonCurve.html wolfram has a list of references, and a description of a simple method to create the paper folding sequence. https://larryriddle.agnesscott.org/ifs/heighway/heighway.htm Check out Larry Riddles page he has a really informative discussion of this and other fractals. And even more references to articles! #creativecoding #p5js #JavaScript #fractal #recursion #dragoncurve