Roses are red, rhodonea curves in a linear gradient

July 25, 2017

Posted: September 27, 2016, 7:53pm

Since this is a blog on an engineering university’s website, I’ll never apologize for a nerdy post (sorry, not sorry). I was recently reminded of the days when I got my first graphing calculator, back in high school calculus. It’s useful for graphing functions and it even had a tiny black-and-white screen to see what various functions looked like. When we learned about polar coordinates, I remember my brain practically melted, what is this new coordinate system?? To add fuel to that fire, our teacher showed us how to graph “flowers” on a polar coordinate. It’s quite simple:

r = cos(k*theta)

The independent variable, theta, is the angle, and the dependent variable, r, is the radius as a function of the angle. This sinusoidal will look like a flower, depending on your selection of k. Splitting the parameter into two controlling parameters (k = n/m), we find that for integer values of n and m, it will complete a perfect loop.

Some things never change, and I wanted to play around with these curves again. Since I left my graphing calculator back in my hometown miles away, I coded up a javascript toy to play with these curves. Here’s a sneak peak. Click the image for a link to the visualization toy!

Published on July 25th, 2017

Last updated on March 22nd, 2021