Lab ·

Generated Sakura - Nature of code - Fractals

Exploring fractals and Perlin noise with P5.js.

In 2016, I took an excellent course by the inimitable Daniel Shiffman on Kadenze. The course was a great introduction to the Nature of Code.

If you are interested in learning creative coding, I highly recommend the course. Lesson 5 was all about fractals, and for the homework assignment I created this little animation; an auto-generated Sakura tree. Once the tree is generated "fractally", the leaves fall down, using vector math and Perlin noise, another technique from the course.

There's a Dragon curve fractal hiding in the background as well.

Click anywhere to generate a (hopefully) lovely Sakura tree.

See it in action or check out the code on GitHub.

Built with canvas with help from P5.js