---
title: Polar coordinates and curves
heading: Describing a shape by direction and distance
eyebrow: A6 · Lesson 48 · Polar coordinates
xp: 40
---

::: hook
An antenna datasheet doesn't show its pattern on $x$ and $y$ axes. It shows a curve drawn around a center: in each direction, how strongly the antenna transmits. A microphone's pickup pattern is drawn the same way. These are **polar** plots, where a point is located by its direction $\theta$ and its distance $r$ from the center, and a curve is a rule $r = f(\theta)$. Shapes that are messy in $x$ and $y$, like a cardioid or a four-petal rose, become one short formula.
:::

::: play
- The curve is $r = a + b\cos\theta$, a family called limaçons. With $a = b$ it's the cardioid of a common microphone.
- Make $b$ larger than $a$. A small inner loop appears behind the main lobe. Why? (Hint: $r$ goes negative.)
- The readout gives the ratio of pickup straight ahead to pickup straight behind.
:::
:::

```sim plot
view: complex
range: 3.2
slider: a = 0.5..2 step 0.1 = 1
slider: b = 0..2 step 0.1 = 1
curve: (a + b*cos(u))*exp(j*u) | over: u = 0..2*pi | label: r = a + b cos θ
readout: r straight ahead = a + b | digits: 3
readout: r straight behind = abs(a - b) | digits: 3
```

::: predict
## A cardioid microphone has the pattern $r = \frac{1}{2}(1 + \cos\theta)$. How does its pickup from the side ($\theta = 90°$) compare with straight ahead?

- [ ] The same
- [x] Half, which is 6 dB down
- [ ] A quarter, 12 dB down
- [ ] Zero

::: reveal
Half. At $90°$, $r = \frac{1}{2}(1 + 0) = \frac{1}{2}$, against $r = 1$ straight ahead: $20\log_{10}\frac{1}{2} = -6$ dB. Straight behind, at $180°$, $r = 0$: the cardioid rejects sound from the back completely, which is why it's the standard stage microphone.
:::
:::

::: nameit
## Polar coordinates

A point at distance $r$ from the origin, in direction $\theta$ measured from the positive $x$ axis, has

$$x = r\cos\theta \qquad y = r\sin\theta \qquad r^2 = x^2 + y^2 \qquad \tan\theta = \frac{y}{x}$$

Pick $\theta$'s quadrant from the signs of $x$ and $y$ (the atan2 rule from A3). A negative $r$ means "go the distance $|r|$ in the opposite direction", which is how limaçons get their inner loops.

## Curves $r = f(\theta)$

| Curve | Shape |
|---|---|
| $r = c$ | Circle of radius $c$ about the origin |
| $r = 2a\cos\theta$ | Circle of radius $a$ through the origin, centered at $(a, 0)$ |
| $r = a(1 + \cos\theta)$ | Cardioid |
| $r = a + b\cos\theta$ | Limaçon, with an inner loop if $b > a$ |
| $r = \cos(n\theta)$ | Rose: $n$ petals if $n$ is odd, $2n$ if even |
| $r = \lvert\cos\theta\rvert$ | Figure eight: a dipole-like pattern |

To convert to $x$ and $y$, multiply by $r$ where it helps: $r = 4\cos\theta$ gives $r^2 = 4r\cos\theta$, so $x^2 + y^2 = 4x$.

## Slopes

The curve is a parametric curve with $x = f(\theta)\cos\theta$, $y = f(\theta)\sin\theta$, so

$$\frac{dy}{dx} = \frac{dy/d\theta}{dx/d\theta} = \frac{r'\sin\theta + r\cos\theta}{r'\cos\theta - r\sin\theta}$$

where $r' = dr/d\theta$.

## Patterns in decibels

Antenna and microphone patterns are usually quoted relative to the peak, in dB: $20\log_{10}\frac{r(\theta)}{r_{\max}}$ for field strength or voltage. The **beamwidth** is the angle between the two directions where the pattern is 3 dB down.
:::

::: example
## What curve is $r = 4\cos\theta$?

::: solution
1. **Multiply by $r$.**
   $$r^2 = 4r\cos\theta \quad\text{so}\quad x^2 + y^2 = 4x$$
2. **Complete the square.**
   $$(x - 2)^2 + y^2 = 4$$
   a circle of radius 2 centered at $(2, 0)$.
3. **Find where it meets the origin.** It passes through the origin at $\theta = \pm 90°$.

**Answer:** it's a circle of radius 2 centered at $(2, 0)$.
:::
:::

::: example
## Find the slope of the limaçon $r = 1 + 2\cos\theta$ where it crosses the positive $y$ axis.

::: solution
1. **Find the point.** That's $\theta = 90°$, where $r = 1$ and $r' = -2\sin\theta = -2$.
2. **Apply the slope formula.**
   $$\begin{aligned} \frac{dy}{dx} &= \frac{(-2)(1) + (1)(0)}{(-2)(0) - (1)(1)} \\ &= \frac{-2}{-1} \\ &= 2 \end{aligned}$$

**Answer:** the slope there is 2.
:::
:::

::: example
## Convert $x^2 + y^2 = 4y$ to polar form. What curve is it?

::: solution
1. **Substitute polar coordinates.** Use $x^2 + y^2 = r^2$ and $y = r\sin\theta$:
   $$r^2 = 4r\sin\theta \quad\text{so}\quad r = 4\sin\theta$$
2. **Identify the curve.** Complete the square in the original:
   $$x^2 + (y - 2)^2 = 4$$
   a circle of radius 2 centered at $(0, 2)$, traced once as $\theta$ goes from 0 to $\pi$.

**Answer:** $r = 4\sin\theta$, a circle of radius 2 centered at $(0, 2)$.
:::
:::

::: check
given: R = 2 | 5; t = 30 | 120
answer: R*cos(t*pi/180)
tolerance: 0.5%

## A point has polar coordinates $r$ = {R}, $\theta$ = {t}°. What is its $x$ coordinate?

::: right
Right. $x = r\cos\theta$ = {answer}.
:::

::: misses
- [R*sin(t*pi/180)] That's $y$.
- [R*cos(t)] Take the cosine of {t} degrees, not radians.
- [any] Not yet. $x = r\cos\theta$.
:::
:::

::: check
given: a = 1 | 3; b = 2 | 4
answer: 180 - atan(b/a)*180/pi
tolerance: 0.5%

## The point $(x, y) = (-\given{a}, \given{b})$ has what polar angle $\theta$, in degrees between 0 and 360?

::: right
Right. It's in the second quadrant: $180° - \tan^{-1}\frac{\given{b}}{\given{a}}$ = {answer}°.
:::

::: misses
- [-atan(b/a)*180/pi] A calculator's $\tan^{-1}(y/x)$ gives the fourth quadrant here. The point has $x < 0$, $y > 0$.
- [atan(b/a)*180/pi] That's the angle of $(\given{a}, \given{b})$. This point is on the left.
- [any] Not yet. Use the signs of $x$ and $y$ to find the quadrant.
:::
:::

::: check
given: a = 1.5 | 3 | 4; let a2 = 2*a
answer: a

## What is the radius of the circle $r = \given{a2}\cos\theta$?

::: right
Right. $r = 2a\cos\theta$ is a circle of radius $a$ = {answer} through the origin.
:::

::: misses
- [2*a] That's the diameter: the curve reaches $r = \given{a2}$ at $\theta = 0$, on the far side of the circle from the origin.
- [any] Not yet. Convert: $x^2 + y^2 = \given{a2}x$, then complete the square.
:::
:::

::: check
given: n = 2 | 4 | 6
answer: 2*n

## How many petals does the rose $r = \cos(\given{n}\theta)$ have?

::: right
Right. {answer}: for even $n$ the loops where $r$ is negative point in new directions, doubling the count.
:::

::: misses
- [n] The loops where $r < 0$ point in new directions and add {n} more petals.
- [any] Not yet. Count the loops, remembering what negative $r$ does.
:::
:::

::: check
given: b = 0.5 | 2 | 3
answer: b
tolerance: 0.5%

## What is the slope $dy/dx$ of the limaçon $r = 1 + \given{b}\cos\theta$ at $\theta = 90°$?

::: right
Right. There $r = 1$ and $r' = -\given{b}$, so $\frac{dy}{dx} = \frac{-b}{-1}$ = {answer}.
:::

::: misses
- [-b] Check the signs in $\frac{r'\sin\theta + r\cos\theta}{r'\cos\theta - r\sin\theta}$.
- [any] Not yet. Find $r$ and $r'$ at $90°$, then use the slope formula.
:::
:::

::: check
given: t = 60 | 90 | 120
answer: 20*log((1 + cos(t*pi/180))/2)
tolerance: 0.5%

## A cardioid microphone has $r = \frac{1}{2}(1 + \cos\theta)$. How many dB below its front pickup is its pickup at {t}°?

::: right
Right. $20\log_{10}\frac{1 + \cos\theta}{2}$ = {answer} dB.
:::

::: misses
- [10*log((1 + cos(t*pi/180))/2)] A pattern of field strength uses $20\log_{10}$.
- [any] Not yet. Find $r$ at {t}° and convert to dB relative to $r = 1$.
:::
:::

::: check
kind: parts
given: a = 2 | 3 | 5; t = 30 | 60

## The circle $x^2 + y^2 = 2\given{a}y$ in polar form.

::: part
answer: 2*a*sin(t*pi/180)
tolerance: 0.5%

### What is $r$ at $\theta$ = {t}°?

::: misses
- [2*a*cos(t*pi/180)] It's $r = 2a\sin\theta$: the circle sits above the origin.
- [any] Substitute $r^2$ and $r\sin\theta$.
:::
:::

::: part
answer: a
tolerance: 0.5%

### What is its radius?

::: misses
- [any] Complete the square in $y$.
:::
:::
:::

::: check
kind: derivation
vars: r = 0.5..5, t = -3..3

## Convert between polar and rectangular form.

::: step
answer: r*cos(t)

### With $\theta$ written as $t$, what is $x$?
:::

::: step
answer: r^2
form: simplified

### What is $x^2 + y^2$?
:::

::: right
Right. $x = r\cos\theta$, $y = r\sin\theta$ and $x^2 + y^2 = r^2$ do every conversion.
:::
:::

::: explain
## Why are antenna and microphone patterns drawn in polar coordinates?

::: model
The pattern answers one question for every direction: how strongly does the device respond to a signal coming from that way? Polar coordinates match that exactly, with $\theta$ as the direction and $r$ as the strength, so the plot looks like the device's reach around itself. A lobe pointing forward on paper points forward in the room. In $x$ and $y$ the same pattern would be a tangle of square roots, and you couldn't read the response in a given direction at a glance.
:::
:::

::: practice

::: check
given: n = 3 | 5 | 7
answer: n

## How many petals does the rose $r = \cos(\given{n}\theta)$ have?

::: misses
- [2*n] For odd $n$, the loops where $r < 0$ land on top of the others.
- [any] Odd $n$ gives $n$ petals.
:::
:::

::: check
given: x = 3 | 5; y = 4 | 12
answer: sqrt(x^2 + y^2)
tolerance: 0.5%

## What is $r$ for the point $(\given{x}, \given{y})$?

::: misses
- [x + y] Use Pythagoras.
- [any] $r = \sqrt{x^2 + y^2}$.
:::
:::

::: check
given: t = 10 | 20 | 30 | 45 | 60 | 70 | 80
answer: 20*log(abs(cos(t*pi/180)))
tolerance: 0.5%

## A figure-eight microphone has $r = |\cos\theta|$. How many dB below its peak is it at {t}°?

::: misses
- [any] $20\log_{10}|\cos\theta|$.
:::
:::

::: check
given: a = 1 | 2; b = 0.5 | 1.5
answer: (a + b)/abs(a - b)
tolerance: 0.5%

## For the limaçon $r = \given{a} + \given{b}\cos\theta$, what is the ratio of $|r|$ straight ahead to $|r|$ straight behind?

::: misses
- [any] $\frac{a + b}{|a - b|}$.
:::
:::
:::
