By Tim King · Updated
Rose Curve Generator
Plot r = cos(kθ) Rhodonea Flowers Online, Free PNG
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Rose Curve Generator works
This rose curve generator draws r = cos(k theta) for any k. A rose curve is the polar graph r = cos(kθ). For whole-number k it is a flower with k or 2k petals; for fractional k the petals overlap into a woven rosette. Set k as a fraction with the two sliders, choose outline or filled, stack a few rotated layers, and save the result as a PNG.
Rose curve generator: getting a good result
In polar coordinates a point is described by its distance r from the centre and its angle θ. The rose curve says the distance swings between 1 and −1 as a cosine of k times the angle, and a negative distance means the point is plotted on the opposite side. That folding is why an odd k gives k petals but an even k gives 2k: with even k the negative lobes land between the positive ones instead of on top of them.
Choosing k. The sliders set k = n ÷ d, reduced to lowest terms. With d = 1 you get the simple flowers: k = 1 is a circle, 2 is a four-leaf clover, 3 a three-petal, 4 an eight-petal, 5 a five-petal. With d greater than 1 the curve takes several turns to close and the petals overlap. k = 2/3 is a three-lobed loop, 5/3 a five-pointed star with curved sides, 7/4 a dense fourteen-petal rosette. The stats line reports the reduced k and the petal count.
Layers draws the same curve several times, each smaller and rotated by a fraction of a petal, so the copies nest inside one another. With Filled and a low alpha, the overlaps build into a layered paper-cut look; with Outline they read as a mandala. A single layer is the plain mathematical figure.
Colour. Rainbow gives each layer its own hue; Single uses one hue from the seed, and Regenerate only rotates the hue because the shape is set entirely by the sliders.
Export. The curve is scaled to the shorter side of the export, so it is complete and centred at any size. A square 2048 × 2048 export suits a print or an avatar; a widescreen 3840 × 2160 leaves ground colour either side of the flower, which reads well as a desktop wallpaper with icons on the left. Nothing is upscaled: the curve is recomputed from the sliders at the new size and every petal edge stays sharp.
FAQ
How many petals does r = cos(kθ) have?
If k is a whole number: k petals when k is odd, 2k when k is even. If k = n/d in lowest terms: n petals when n·d is odd, 2n when n·d is even, and they overlap when d is greater than 1. The stats line does this sum for you.
What is the difference between cos and sin roses?
Only rotation. r = sin(kθ) is the same flower turned by 90°/k, so the petal count and shape are identical. Use the Layers slider if you want rotated copies on top of each other.
Why does k = 1 draw a circle off-centre?
r = cos(θ) is a circle of diameter 1 passing through the origin, which is the correct graph. Every other k is centred because the petals are symmetric about the origin.
Can I make a mandala?
Yes: choose a k with many petals such as 7/4 or 9/5, set Layers to 8 or more, Filled style and Rainbow colour. Export square for a print.
See also: all Generative Art tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.
Related tools
Spirograph Generator
Set the ring, gear and pen offset; the curve draws until it closes.
Lissajous Curve Generator
Two sine waves at right angles; set the frequencies and phase, save the figure.
Harmonograph Generator
Damped pendulum figures; set frequencies, detune and damping, save the spiral.
Sierpinski Triangle Generator
Sierpinski triangle by subdivision or chaos game; export as PNG.
Koch Snowflake Generator
Koch snowflake and anti-snowflake to any depth; export as PNG.