# Viviani's Curve

Curve · (x, y, z) = f(u, t)

`(1 + cos(u),  sin(u),  2 · sin(u/2))`

[Open in the app](https://www.wavelace.com/app#p=45) · [This page](https://www.wavelace.com/presets/vivianis-curve)

### What it draws

None of the three expressions uses `t`, so the figure is fixed and playing changes nothing on screen. The second expression, `sin(u)`, is the height, which stays within `±1`. Two facts about the point pin it down, and both hold exactly. Its distance from the origin is always `2`, so the curve lies on a sphere of radius `2`.

The first two expressions alone satisfy `(x − 1)² + y² = 1`, a circle of radius `1` through the origin. The curve therefore lies as well on the cylinder standing on that circle, whose axis runs into depth. Viviani's curve is exactly where those two surfaces meet: a cylinder half as wide as the sphere, touching it from inside at the single point `(2, 0, 0)`. The half angle `u/2` in the third expression is why `Turns of u` opens at 2. After `u = 2π` the point is back at that touching point having drawn only one of the two lobes, and the second turn draws the other.

### The three shadows

Each flat view of the curve is a different classical figure. Looking down the depth axis, along the cylinder, the two lobes fall on top of each other and the shadow is the circle of radius `1`. Looking down the vertical, the shadow is the parabola `x = 2 − z²/2`. Looking along the remaining horizontal axis it is a figure eight, `y² = z²·(1 − z²/4)`, the lemniscate of Gerono.

### History

Vincenzo Viviani, the last pupil of Galileo, published the curve in 1692 as a challenge to the mathematicians of Europe. Cut four such windows from a hemispherical dome, he asked, so that the vault left standing has an area that can be squared exactly, with no `π` in it. Answers came quickly, Leibniz and Jakob Bernoulli among them, and the shape has carried Viviani's name since.

### Try

- Drop `Turns of u` to 1: only half the curve is drawn, an open arc that stops at the point where the cylinder touches the sphere.
- `Side`: the shadow is the figure eight, the lemniscate of Gerono.
- `Top`: the shadow is the parabola, the flattest of the three views.
- Turn on `trace`: with nothing else moving, the pen is the only motion, and it draws one lobe before the other.
- Change the third expression to `2·sin(u/2)·cos(t)`. The curve now flattens onto its circle and swells back out every `2π ≈ 6.28` seconds, and it is Viviani's curve only at the two extremes.

### Read more

- [Viviani's curve](https://en.wikipedia.org/wiki/Viviani%27s_curve)
- [Vincenzo Viviani](https://en.wikipedia.org/wiki/Vincenzo_Viviani)
- [Lemniscate of Gerono](https://en.wikipedia.org/wiki/Lemniscate_of_Gerono)
- [Cylinder (geometry)](https://en.wikipedia.org/wiki/Cylinder_(geometry))
