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 Move
s, 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:
- change the generated code below directly in the p5.js sandbox, which runs in the browser -- no installation required!
- follow these instructions to be able to work with the code offline