dragon curves


this is a live demo - try changing the parameters and see how the curve changes!

A dragon curve is a type of fractal, a mathematical piece of art that can be zoomed into infinitely yet still look "the same". Fractals like dragon curves can be used to model plant growth and create realistic-looking trees in video game graphics.







A dragon curve is made up of one or more Moves, separated by a new line. Moves take in two parameters: a change in X, and a change in Y (separated by a comma).


If you want to play with the underlying code on your own, you can either:



Generated p5.js code

This powers what you see, but reacts to the changes you make! You can run this code in the p5.js sandbox, or learn more about p5.js through p5.js tutorials.