The idea: a point that swings in and out while it turns
In polar coordinates a point is given by an angle θ and a distance r from the origin. The rose curve (also called a rhodonea) lets r depend on θ like this:
r = cos(kθ) x = r·cos θ, y = r·sin θ
While θ turns, r swings between 1 and −1, k times as fast as the turn. Each swing out to the circle r = 1 and back to the origin draws one petal. How many petals there are, and how far θ has to run before the curve closes, depends only on k.
Reading r = cos(kθ)
Every rose starts at θ = 0 with r = cos 0 = 1: the point (1, 0), the green dot on the canvas. The curve reaches the origin whenever cos(kθ) = 0 and the circle r = 1 whenever cos(kθ) = ±1, so all petals have length 1.
r is often negative. A negative r means "walk |r| the other way": the point (r, θ) is the same as (−r, θ + π). On the canvas the grey ray shows the angle θ and the blue line the real radius; when r < 0 they point in opposite directions. (Demo: k = 3: 3 petals, θ from 0 to π: watch the pen jump to the other side of the grey ray.)
Whole k: odd and even
Turn θ by half a turn, θ → θ + π. Then r = cos(kθ + kπ):
- k odd: cos(kθ + kπ) = −cos(kθ). The new point is (−r, θ + π), which is the old point. The second half-turn only retraces the first, so θ from 0 to π draws all k petals.
- k even: cos(kθ + kπ) = cos(kθ). The new point is (r, θ + π), the old point turned half a turn around the origin. The second half-turn draws k new petals between the old ones: 2k petals, and θ must run to 2π.
| k | petals | θ to close | angle between petal tips |
|---|---|---|---|
| 1 | 1 (a circle of diameter 1 through the origin) | π | — |
| 2 | 4 | 2π | π/2 |
| 3 | 3 | π | 2π/3 |
| 4 | 8 | 2π | π/4 |
| 5 | 5 | π | 2π/5 |
| 10 | 20 | 2π | π/10 |
So a rose never has 2, 6 or 10 petals when k is whole: those counts would need an odd k of 2, 6, 10 or an even k of 1, 3, 5. (Demo: k = 1, 2, 3, 4, 5: odd k → k petals, even → 2k, Demo: k = 4: 8 petals, θ from 0 to 2π.)
Fractions: k = p/q
Write k = p/q in lowest terms. The curve closes when the pen is back at (1, 0) heading the same way. That happens when θ is a whole number of half-turns and kθ is too, with the same kind of sign flip:
- p·q odd (both odd): after θ = qπ, kθ = pπ, r has flipped sign and θ has made an odd number of half-turns, so the point is back. p petals.
- p·q even: the flips do not match after qπ, so θ needs 2qπ, where kθ = 2pπ. 2p petals.
Whole k is the case q = 1. For q > 1 the petals are wide (k < 1) or many and overlapping, and the pen has to circle the origin q or 2q times before it closes.
| k | p/q | p·q | θ to close | petals |
|---|---|---|---|---|
| 0.5 | 1/2 | 2, even | 4π | 2 |
| 2/3 | 2/3 | 6, even | 6π | 4 |
| 5/4 | 5/4 | 20, even | 8π | 10 |
| 0.2 | 1/5 | 5, odd | 5π | 1 |
| 2.5 | 5/2 | 10, even | 4π | 10 |
| 0.3 | 3/10 | 30, even | 20π | 6 |
| 9.9 | 99/10 | 990, even | 20π | 198 |
(Demo: k = 1/2: θ must run to 4π, Demo: k = 2/3, then k = 5/4.)
Irrational k never closes
To be back at the start, θ must be a whole number n of half-turns and kθ a whole number m of half-turns, so k = m/n would be a fraction. For k = √2 that never happens. Each new petal lands a little beside the old ones, and as θ grows the petals fill the whole disk r ≤ 1. The page draws θ up to 60π. (Demo: k = √2 never closes.)
The same rule decides whether a Lissajous figure closes: two frequencies with a rational ratio give a closed curve, an irrational ratio fills a rectangle.
Playing k from 0 to 10
k = 0 gives r = cos 0 = 1, the unit circle. Then every step of 0.1 is a fraction with q = 10, 5, 2 or 1, so the closing angle jumps around: 20π for k = 0.1, 5π for 0.2, 4π for 0.5, π for 1. Whole k give the clean pictures; the tenths in between are dense, overlapping flowers that need up to 20π. (Demo: play k from 0 to 10 in steps of 0.1.) The speed choice sets how long Play and Trace θ take. Each curve is drawn through up to 12 000 points, uniform in θ, so the petal tips stay sharp even at k = 9.9 with its 198 petals.
A rose is also a spirograph curve (a hypotrochoid with special radii). Join points of a rose with straight lines at a fixed angle step and you get a Maurer rose. The Heart Curve sweeps its parameter m the same way, in Cartesian coordinates.
What the page leaves out
r = sin(kθ), which is the same rose turned by π/(2k); r = a·cos(kθ) with a ≠ 1, which only scales it; negative k, which mirrors it about the x-axis; the area of a rose (half the circle's area for even k, a quarter for odd k); and k above 10. The √2 curve is cut at θ = 60π.