Polar Graph Generator | r(θ)
Plot polar equations r(θ) including roses, spirals, and limaçons. Download as PNG.
Presets
What Is the Polar Graph Generator | r(θ)?
This polar graph generator plots any polar equation r = f(θ) on a light-themed canvas with a polar grid, auto-scaling, and labelled angle axes. It includes 10 classic presets, a colour picker, adjustable sample count, and PNG download.
- ›10 presets: Cardioid, Rose 3-petal, Rose 4-petal, Archimedean Spiral, Lemniscate, Limaçon, Inner Loop Limaçon, Fermat's Spiral, Rose 5-petal, Butterfly curve.
- ›Light canvas: White background with pale polar grid and labelled axes (0°/90°/180°/270°).
- ›Auto-scale: The plot automatically scales to fit the curve within the canvas.
- ›Colour picker: Choose any curve colour with the HTML colour input.
- ›Sample count: 100 to 3000 steps for smooth or fast rendering.
- ›Download PNG: Save the plot as a high-quality PNG image.
Formula
| Curve | Equation r(θ) | θ range |
|---|---|---|
| Cardioid | r = 1 + cos(θ) | 0 to 2π |
| Rose n-petal | r = cos(nθ) | 0 to π (odd n) or 2π (even n) |
| Archimedean Spiral | r = θ/(2π) | 0 to any |
| Lemniscate | r = √|cos(2θ)| | 0 to 2π |
| Fermat's Spiral | r = √θ | 0 to 4π |
| Butterfly curve | r = ecos(θ) − 2cos(4θ) + sin⁵(θ/12) | 0 to 12π |
How to Use
- 1Click a preset to load a classic polar curve, or type your own r = f(θ) expression.
- 2Use t as the angle variable (θ). Available functions: sin, cos, tan, sqrt, abs, exp, log, pow, Math.PI.
- 3Set the θ range (typically 0 to 6.2832 for one full revolution).
- 4Adjust sample steps (higher = smoother curve, slower render).
- 5Choose a curve colour.
- 6Click Plot to render the graph.
- 7Click Download PNG to save the image.
Example Calculation
Plotting a 5-petal rose: r = cos(5θ)
Negative r values in polar coordinates
Understanding Polar Graph Generator | r(θ)
Polar Coordinates
Polar coordinates (r, θ) describe a point by its distance r from the origin and angle θ from the positive x-axis. The conversion to Cartesian is x = r·cos(θ), y = r·sin(θ). Many curves that require complex equations in Cartesian form are elegantly simple in polar form, a circle centred at the origin is just r = constant, and a spiral is r = θ.
Classic Polar Curves
- ›Cardioid r = 1 + cos(θ): Heart-shaped curve; boundary of the main bulb in the Mandelbrot set.
- ›Rose r = cos(nθ): n petals when n is odd; 2n petals when n is even. Used in antenna engineering and harmonic analysis.
- ›Archimedean spiral r = aθ: Constant spacing between successive turns; models spring coils and vinyl record grooves.
- ›Lemniscate r = √|cos(2θ)|: Figure-8 shaped curve; the symbol ∞ (infinity) derives from this shape.
- ›Limaçon r = a + b·cos(θ): Produces a dimple when a/b < 1, inner loop when a/b < 1, cardioid when a = b.
Applications of Polar Graphs
Polar coordinates appear naturally in physics and engineering wherever circular or rotational symmetry is present. Antenna radiation patterns, cyclone isobars, magnetic field lines around a wire, and acoustic directivity are all naturally expressed in polar form. The Bohr model of the atom used polar coordinates to describe electron orbits, and Kepler's laws of planetary motion are most elegantly stated as r = a(1−e²)/(1+e·cos(θ)), an ellipse in polar form.
Frequently Asked Questions
What are polar coordinates?
Polar coordinates (r, θ) define a point by its distance r from the origin (called the pole) and its angle θ measured counterclockwise from the positive x-axis. Unlike Cartesian (x, y) coordinates that use perpendicular distances from two axes, polar coordinates describe position using rotation and distance, natural for circular and spiral geometry. Conversion to Cartesian: x = r·cos(θ), y = r·sin(θ). Inverse: r = √(x²+y²), θ = atan2(y, x).
- ›A circle centred at the origin: simply r = constant in polar form (vs x² + y² = r² in Cartesian)
- ›A spiral: r = aθ, radius grows linearly with angle, impossible to write elegantly in Cartesian
- ›A cardioid: r = 1 + cos(θ), just 12 characters vs a complex implicit Cartesian equation
- ›Angle θ is measured in radians: 0 = east (right), π/2 = north (up), π = west, 3π/2 = south
- ›Negative r values plot the point in the opposite direction: r = −1 at θ = 0 plots at (1, π)
What functions can I use in my polar expression?
Use t as the angle variable θ. The expression is evaluated as a JavaScript expression, so all standard JavaScript Math functions are available, either directly (e.g. sin(t)) or prefixed with Math (e.g. Math.sin(t)). Arithmetic operators +, −, *, /, and ** (power) are all supported, along with parentheses for grouping.
- ›Trig: sin(t), cos(t), tan(t)
- ›Roots and powers: sqrt(t), pow(t, 2), t**3
- ›Other: abs(t), exp(t), log(t) (natural log)
- ›Constants: Math.PI ≈ 3.14159, Math.E ≈ 2.71828
- ›Example: 2*cos(3*t) + sin(t), exp(cos(t)) - 2*cos(4*t)
Why does my rose curve have more/fewer petals than expected?
For r = cos(nθ), the petal count depends on whether n is odd or even. If n is odd, the curve has exactly n petals drawn over θ ∈ [0, π], because the negative r values from π to 2π exactly retrace the same petals already drawn in the first half. If n is even, the curve has 2n petals and requires θ ∈ [0, 2π] to draw all of them, because the negative-r values trace a new set of petals rather than retracing the existing ones.
- ›r = cos(3t), θ from 0 to π: 3 petals, correct (going to 2π traces each petal twice)
- ›r = cos(4t), θ from 0 to 2π: 8 petals (2×4), needs the full revolution
- ›r = cos(5t), θ from 0 to π: 5 petals; to 2π: each petal drawn twice (still looks like 5)
- ›r = sin(nθ) follows the same rules but rotated 90°/n relative to the cos version
What is a cardioid and where does it appear?
A cardioid is the curve r = a(1 + cos(θ)), a heart-shaped closed curve generated geometrically by tracing a point on a circle of radius a as it rolls around another circle of the same radius. The name comes from the Greek "kardia" (heart). It is a special case of the limaçon r = a + b·cos(θ) when a = b. The cardioid has one cusp (the pointed bottom) where the rolling circle passes through the point of tangency.
- ›Mandelbrot set: the boundary of the main bulb is exactly a cardioid in the complex plane
- ›Microphone directivity: cardioid microphones pick up sound from the front and reject the rear
- ›Coffee cup caustic: the bright crescent formed by reflections of light on the inside of a mug
- ›Envelope of circles: the cardioid is the envelope of all circles passing through the origin whose centres lie on a fixed circle
How do I graph a spiral that grows outward?
The Archimedean spiral r = aθ grows linearly with angle, constant spacing between successive turns. The Fermat spiral r = √θ grows as the square root, so turns get progressively closer together as r increases. The logarithmic (equiangular) spiral r = e^(bθ) keeps a constant angle between the tangent and the radial line, seen in nautilus shells and galaxy arms. Use larger θ ranges to show more turns of any spiral.
- ›Archimedean: enter t/(2*Math.PI) with θ from 0 to 12.57 (2 turns), constant turn spacing
- ›Fermat: enter sqrt(t) with θ from 0 to 12.57, inner turns are wider, outer turns compress
- ›Logarithmic: enter exp(0.2*t) with θ from 0 to 12.57, self-similar spiral, same shape at all scales
- ›Hyperbolic spiral r = a/θ: starts far out and converges toward the origin as θ increases
Why does the butterfly curve need θ from 0 to 12π?
The butterfly curve r = e^cos(θ) − 2cos(4θ) + sin⁵(θ/12) contains the term sin(θ/12). The period of sin(θ/12) is 2π × 12 = 24π, the curve only returns to its starting point after 24π radians of θ. Using θ from 0 to 12π (≈ 37.7) captures about half the complete curve, enough to see most of the wing structure. The full curve requires θ from 0 to 24π ≈ 75.4. Using shorter ranges shows increasingly incomplete outlines of the wings.
- ›θ from 0 to 2π: one-twelfth of the full curve, just a small segment
- ›θ from 0 to 12π: roughly half the curve, most of the wing structure visible
- ›θ from 0 to 24π: the complete curve closes back on itself
- ›The sin⁵(θ/12) term is responsible for the slow variation giving the wing texture
- ›Increasing sample count to 2000–3000 gives smoother rendering for this complex curve
Can I plot multiple polar curves on the same graph?
This calculator plots one curve at a time on a fresh canvas. To visually compare two curves side by side, plot the first, download it as a PNG, then plot the second. You can overlay the two images in any image editor. For interactive multi-curve polar plotting, where both curves update together as you change parameters, dedicated graphing tools offer that capability while this calculator focuses on making each individual curve as detailed and downloadable as possible.
- ›Download PNG after each plot to preserve curves for comparison
- ›Desmos (desmos.com/calculator): free online graphing with full polar multi-curve support
- ›GeoGebra: supports polar curves and geometric constructions simultaneously
- ›Wolfram Alpha: type "polar plot r=1+cos(t), r=2cos(t)" for instant side-by-side comparison