Set starting k, hit flag. Play with color, speed. Wait for transformations (auto increasing k). At high k, see petals of petals, even moving different directions. Try stopping to get snapshot of patterns. R is just the radius. Spacebar hides variables.
Increasing k increases number of petals, but more happens. In polar coordinates, it's just: r = a cos(n θ) k changes each iteration (after running through enough angle changes to complete 360 degrees). I used sine of time to elicit constant transformation, incrementing k and angle with each redraw. Based on famous "Rose Curve."