Interactive Rose Curve

If you're not into Maths, just take the below as a pretty, interactive pattern. If you are, it's a rose or rhodonea curve, ie: a curve described by the polar equation r = cos(kθ). In my implementation, k is a rational number defined by a variable numerator and denominator. This project is based on one of the great Daniel Shiffman's coding challenges.