MathsGraphing & Visualization

Polar Graph
generator.

Plot r as a function of θ for roses, cardioids and spirals, with the area and length.

How it's worked out

In polar form, a point is a distance r from the center, called the pole, and an angle θ turned counterclockwise from the positive x-axis. A polar equation says how far out the curve is in each direction. To draw it, the tool turns each pair into ordinary x and y, using OpenStax equation 7.7:

x\displaystyle x=rcos⁡θ\displaystyle {}= r\cos\theta
y\displaystyle y=rsin⁡θ\displaystyle {}= r\sin\theta

When r is negative, the point goes the other way: along the ray opposite the angle, at distance |r|. That is how a limaçon gets its small inner loop, and how a rose with an even number in it gets its extra petals.

Area. The radius sweeps out thin wedges as θ turns. Each wedge is close to a sector with area 12r2Δθ\frac{1}{2}r^2\,\Delta\theta, and adding them gives Theorem 7.6 in OpenStax section 7.4:

A\displaystyle A=12∫αβr2dθ\displaystyle {}= \frac{1}{2}\int_{\alpha}^{\beta} r^2\, d\theta

The tool works this out with Simpson's rule over 8,000 steps. Because r is squared, a stretch where r is negative still adds area.

Length uses Theorem 7.7, where r' is how fast r changes with θ:

L\displaystyle L=∫αβr2+(drdθ)2dθ\displaystyle {}= \int_{\alpha}^{\beta} \sqrt{r^2 + \left(\frac{dr}{d\theta}\right)^2}\, d\theta

OpenStax Example 7.18 finds 16 for the cardioid r=2+2cos⁡θr = 2 + 2\cos\theta, and the tool gives 16. For r=1+cos⁡θr = 1 + \cos\theta it gives a length of 8 and an area of 4.7124, which is 3π2\frac{3\pi}{2}.

Tips and pole passes. The tool also finds each angle where r is 0, so the curve goes through the pole, and each angle where |r| peaks, the tip of a petal or loop. It splits the range at the zeros and gives the area of each piece.

Worked examples

Lena reads a cardioid microphone pattern

A cardioid microphone picks up sound best from the front and least from the back. Lena draws its pattern as r=0.5+0.5cos⁡θr = 0.5 + 0.5\cos\theta, scaled so the front, at θ = 0, is 1.

Straight ahead r is 1. From the side, at θ=π2\theta = \frac{\pi}{2}, r is 0.5, so sound there is picked up at half the strength in this scale. From behind, at θ = π, r is 0 and the curve touches the pole.

The pattern is 4 units around. It is a cardioid, a special limaçon, because the two numbers in it are equal.

Open this example in the tool

Jon finds the area of one petal of a rose

Jon's homework asks for the area of one petal of r=3sin⁡2θr = 3\sin 2\theta. The number by θ is even, so the rose has 4 petals, and the tool finds 4 tips, each 3 from the pole.

The pole passes split 0 to 2π into 4 pieces, one per petal. Each has an area of 3.5343, which is 9π8\frac{9\pi}{8}, as in OpenStax Example 7.16. All four together come to 14.1372.

At θ=π4\theta = \frac{\pi}{4}, the tip of the first petal, r is 3 and the tangent slope is −1, because the curve crosses the 45° line at a right angle there.

Open this example in the tool

Maya separates the loops of a limaçon

For r=0.5+cos⁡θr = 0.5 + \cos\theta, r turns negative between 2π3\frac{2\pi}{3} and 4π3\frac{4\pi}{3}, down to −0.5. That stretch draws the small inner loop.

The full turn sweeps 2.3562. The pieces show where it comes from: the inner loop alone is 0.1359, and the rest of the turn sweeps the large outer loop.

The area inside the outer edge is 2.2203. The region between the two loops is 2.0844, because the inner loop sits inside the outer one and has to come out once more.

Open this example in the tool

Reading your result

The big number is half the integral of r² over your θ range. It equals the area of the shape only when the radius sweeps each part of the plane once.

Through the pole says how many times r reaches 0. Each pass starts a new piece in the pieces table, and those pieces usually match the petals or loops you can see.

Tips are the points farthest from the pole on each petal or loop. A tip with a negative r is drawn on the opposite side of the pole from its angle.

The point at θ gives r, the x and y position, how fast r is changing, and the slope of the tangent in ordinary x and y.

Common mistakes

  • Running an odd rose to 2π. r=cos⁡3θr = \cos 3\theta is drawn in full by θ = π and then traced again. Over 0 to π the area is 0.7854, while over 0 to 2π it is 1.5708, double, with no change in the picture.
  • Typing degrees. θ is in radians. A range from 0 to 360 runs about 57 turns, so r=cos⁡θr = \cos\theta gives an area of 89.93 instead of the 0.7854 of one circle. Use π for 180°, or multiply θ by π180\frac{\pi}{180} inside the expression.
  • Ignoring negative r. A point with r = −1 at θ = 0 sits at (−1, 0), not (1, 0). Sketching only positive values leaves out inner loops and petals.
  • Adding the inner loop of a limaçon to the outer area. The outer sweep already covers the inner loop, so the full-turn area counts it twice.

Questions people ask

An odd rose such as r = cos 3θ draws all its petals by θ = π, so running to 2π traces each petal twice and doubles the area. Use 0 to π for an odd number by θ and 0 to 2π for an even one.

Sources