lexiortiz / butterfly-curve

A butterfly curve sketch drawn with p5.js for practice with parametric equations in creative programming.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

butterfly-curve

A butterfly curve sketch drawn with p5.js for practice with parametric equations in creative programming.

The butterfly curve is an aesthetically pleasing transcendental plane curve and one of my favorite mathematical equations to turn into code. It took time for me to convert the equations into Javascript and then again with the p5.js library, but overall this exercise was fairly simple!

Butterfly Curve Equations

To learn more about the butterfly curve, visit Wikipedia and MathWorld. These informative sites helped me a bunch, but there were moments when I needed additonal help and had to research furthur. In these moments, I ran to The Coding Train and watched a few resourceful videos on the specific problems I was facing. There are so many helpful tutorials to choose from, but I found these couple videos to help me the most with this project: Polar Coordinates and Mathematical Rose Patterns

Finally, I was playing around with 3D shapes when I accidently developed the look of a gradient background by using a torus shape and enlarging it. I love the use of the torus with the butterfly sketch!

A screenshot of the Butterfly Curve and Gradient Background

See the Pen Butterfly Curve by Lexi ♡ (@huesofheart) on CodePen.

About

A butterfly curve sketch drawn with p5.js for practice with parametric equations in creative programming.

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 73.2%Language:HTML 23.4%Language:CSS 3.4%