# Superellipsoid

Shape · (x, y, z) = f(u, v, t)

`((sin(v))^(abs(ε)) · sign(cos(u)) · abs(cos(u))^(abs(ε)),  sign(cos(v)) · abs(cos(v))^(abs(ε)),  (sin(v))^(abs(ε)) · sign(sin(u)) · abs(sin(u))^(abs(ε)))`

[Open in the app](https://www.wavelace.com/app#p=140) · [This page](https://www.wavelace.com/presets/superellipsoid)

### What it draws

Set the exponent to `1` and read the three expressions again: the height is `cos(v)`, and `sin(v)` is the distance from the vertical axis, spread round it as `cos(u)` and `sin(u)`. That is the ordinary sphere, with `u` as longitude and `v` as the angle down from the north pole.

Everything else is the exponent. Each sine and cosine is raised to the power `|ε|`, and since a fractional power of a negative number is undefined, the formula raises the size of the factor and puts its sign back with `sign(…)`. The eight octants therefore stay where they belong and only the profile between them changes. The factor in `v` needs no such repair, because `v` runs from `0` to `π` and `sin(v)` never goes negative there.

### One exponent, four solids

The number to watch is the radius along a diagonal of the equator, with the radius along the axes held at `1`. On a sphere it is `1`, and on a straight edge joining two axis points it is `1/√2 ≈ 0.707`. It falls as `ε` rises, passing each landmark exactly.

Near `ε = 0` the diagonal radius approaches `√2` and the surface is a cube with its corners rounded off; the preset opens at `0.3`, where the radius is `1.27` and the flat faces are broad. At `ε = 1` it is exactly `1` and the solid is a true sphere. At `ε = 2` it is exactly `1/√2`, and every point of the surface satisfies `|x| + |y| + |z| = 1`: a regular octahedron, with eight flat triangles. Beyond that the faces cave inward and the shape becomes a pinched star, the diagonal radius down to `0.354` at `ε = 4`. One stop is degenerate: at `ε = 0` every factor becomes `1` and only the eight corners are left.

### History

Gabriel Lamé generalised the equation of the ellipse in the nineteenth century by leaving its exponent free. Piet Hein gave the curve its name in 1959, when he won a competition to shape the roundabout at Sergels torg in Stockholm with one. Alan Barr carried the idea into three dimensions for computer graphics in 1981, under the name superquadrics, which is where the exponent trick with the signs comes from.

### Try

- Drag `ε` to 1: an exact sphere, the shape the preset Breathing Sphere pulses around.
- Drag `ε` to 2: an exact octahedron. Press `Top` and the four upper faces read as four flat triangles meeting over the centre.
- Drag `ε` to 4: the faces are pulled inward and six spikes are left, one along each direction of each axis.
- Drag `ε` to −2: the octahedron again, since only the size of the exponent is used.
- Set `Mesh` to its top stop for the lit solid, where the flat faces and the sharp edges are easiest to read.

### Read more

- [Superellipsoid](https://en.wikipedia.org/wiki/Superellipsoid)
- [Superquadrics](https://en.wikipedia.org/wiki/Superquadrics)
- [Superellipse](https://en.wikipedia.org/wiki/Superellipse)
- [Octahedron](https://en.wikipedia.org/wiki/Octahedron)
