The Garden

PortfolioAbout

Rose Curves in p5.js

I first stumbled across the concept of a rhodonea curve while trying to figure out how to draw flowers in p5.js. A rhodonea curve is, in essence, a sine (or cosine) wave traced around a central point. Imagine plotting points on a piece of paper, each one placed a little closer or farther from a center point as you move around in a circle. When you connect those points, the line loops around that center, moving in and out in a smooth, wave-like pattern that forms a shape resembling a flower petal. Fittingly, the rhodonea curve is also called a rose.

A rose is specified by the equation: r = cos(kθ), where k is the number of rotations (or total angular range) required for a rhodonea curve to complete one full closed figure. The value of k can be expressed as a ratio k = n/d. I thought it would be fun to draw the petals I found most interesting by selecting certain combinations of n and d.

Here's my first attempt, in black and white:

And this is my attempt in colour: