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.

Four roses inside the unit circle: k = 2 has 4 petals (θ from 0 to 2π), k = 3 has 3 petals (θ from 0 to π), k = 4 has 8 petals (θ from 0 to 2π), k = 5 has 5 petals (θ from 0 to π); a green dot marks the start point (1, 0) on each
Whole k: odd k gives k petals and closes at θ = π; even k gives 2k petals and needs the full turn.

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π.
kpetalsθ to closeangle between petal tips
11 (a circle of diameter 1 through the origin)π—
242ππ/2
33π2π/3
482ππ/4
55π2π/5
10202ππ/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.

Three roses: k = 1/2 closes at θ = 4π with 2 petals, k = 2/3 closes at 6π with 4 overlapping petals, k = 5/4 closes at 8π with 10 overlapping petals
k = p/q with p·q even needs θ = 2qπ: 4π for 1/2, 6π for 2/3, 8π for 5/4.
kp/qp·qθ to closepetals
0.51/22, even4π2
2/32/36, even6π4
5/45/420, even8π10
0.21/55, odd5π1
2.55/210, even4π10
0.33/1030, even20π6
9.999/10990, even20π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 curve r = cos(√2·θ) drawn for θ from 0 to 4π, to 20π and to 60π: a few petals, then many, then the disk is nearly filled
k = √2: the more θ runs, the more of the disk the petals cover; the curve never repeats.

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π.