# Focal Conic

Polar · r = f(θ, t)

`r = ((abs(1 + ε · cos(θ)) > 0.2) ?((1/(1 + ε · cos(θ)))) :(0/0))`

[Open in the app](https://www.wavelace.com/app#p=135) · [This page](https://www.wavelace.com/presets/focal-conic)

### What it draws

The curve is `r = 1/(1 + ε·cos(θ))`. Straight up, at `θ = π/2`, the cosine is zero and the denominator is `1`, so the curve passes one unit above the origin whatever `ε` is. Ahead, at `θ = 0`, the denominator is biggest and the curve nearest: `r = 0.625` at the opening value `ε = 0.6`. Behind, at `θ = π`, the denominator falls to `0.4` and `r = 2.5`, four times as far out.

The formula is written as a case so that it leaves a gap wherever `1 + ε·cos(θ)` comes within `0.2` of zero. That is the pole: the radius runs off to infinity there, and the gap marks the angles that have left the plot. Nothing is drawn further out than `5`, the reciprocal of that cut. Up to `ε = 0.7` the curve is whole; at `0.8` it grazes the cut, and the gap reads as an arc from `0.81`.

### Four curves in one slider

`ε` is the eccentricity, and it alone decides which conic. At `ε = 0` the denominator is `1` everywhere and the curve is a circle. Below `1` the denominator stays positive, so `r` stays finite and the curve closes: an ellipse, with the origin at one focus rather than at the centre. At `ε = 1` the denominator vanishes behind and the curve opens into a parabola. Past `1` it changes sign over a wedge of angles, `r` goes negative there, and those points plot on the opposite side as the second branch of a hyperbola. As drawn that branch arrives at `ε = 1.3`, the first stop of the slider at which the denominator reaches below `−0.2`.

### Kepler's first law

This is the orbit equation. A body falling around another under an inverse square attraction traces one of these conics, and the attracting body sits at the focus, the origin here. Kepler read the ellipse out of Tycho Brahe's observations of Mars and published it in *Astronomia nova* in 1609; Newton derived the whole family from his law of gravitation in 1687. Earth's orbit has `ε ≈ 0.017`, a circle to the eye; Halley's comet has `ε ≈ 0.967`, far closer to the picture on screen.

### Try

- Drag `ε` to `0`: with no eccentricity left, the ellipse closes into a circle.
- Drag `ε` to `1`: the far end stops coming back, and the curve opens into a parabola with a gap behind.
- Carry on to `1.3` and the second branch appears, facing the first across the gap. By `ε = 10` the pair is nearly two straight lines.
- Type `1/(1 + 0.6·cos(θ))`, the formula without its case: at this eccentricity it draws exactly the same ellipse.
- Turn the axis with `1/(1 + 0.6·cos(θ − π/2))`: the same ellipse given a quarter turn.

### Read more

- [Conic section](https://en.wikipedia.org/wiki/Conic_section)
- [Kepler's laws of planetary motion](https://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion)
- [Orbit equation](https://en.wikipedia.org/wiki/Orbit_equation)
- [Eccentricity (mathematics)](https://en.wikipedia.org/wiki/Eccentricity_(mathematics))
- [Focus (geometry)](https://en.wikipedia.org/wiki/Focus_(geometry))
