# Gielis Supershape

Polar · r = f(θ, t)

`r = (abs(cos((m · θ)/4))^(n₂) + abs(sin((m · θ)/4))^(n₃))^(−1/n₁)`

[Open in the app](https://www.wavelace.com/app#p=134) · [This page](https://www.wavelace.com/presets/gielis-supershape)

### What it draws

Inside the brackets sit `|cos(m·θ/4)|` and `|sin(m·θ/4)|`, each raised to an exponent of its own and added. That pair runs through its pattern `m/2` times in a turn of `θ`, with two tips each time, so the figure carries exactly `m` lobes. Setting `m = 0` leaves a plain circle.

The outer power `−1/n₁` turns that sum into a radius. At the opening values the bracket is 1 wherever one of the two terms is `±1` and the other 0, and it falls to `2·2^(−3.5)` where they are equal in size. So the radius runs from 1 at the first set of angles out to `≈ 2.38` at the second, giving a five pointed star with rounded tips.

### One formula, many shapes

Set `m = 4` and all three exponents to the same `p`, and the radius becomes `(|cos θ|^p + |sin θ|^p)^(−1/p)`. That is the superellipse `|x|^p + |y|^p = 1`: a circle at `p = 2`, a square standing on its corner at `p = 1`, and a rounded square as `p` grows. The other three letters are the freedom added on top. `m` makes the symmetry count anything at all, while `n₂` and `n₃` sharpen the two halves of each lobe separately.

`n₁` is the letter with a sign. Negative values give radii that are the reciprocals of the positive ones, so at `−2` the figure runs from `0.42` out to 1 and each tip has become a notch: the star is inside out. At `n₁ = 0` the exponent is undefined and nothing is drawn. One more detail sets `Turns of θ`: the curve closes in a single turn while `n₂` and `n₃` agree, and needs two once they differ with an odd `m`.

### History

Johan Gielis published this in 2003, in the American Journal of Botany, as one transformation covering a wide range of natural and abstract shapes. It generalises the superellipse, and it is usually called the superformula.

### Try

- Drag `m` to 6: six lobes instead of five. The count follows the letter exactly, all the way to 10.
- Drag `n₁` to −2 and the figure turns inside out, the five points becoming five notches on a body of radius 1.
- Drag `n₃` to 10: the lobes stretch and lose their mirror symmetry, the tips reaching `≈ 3.0` where they reached `2.38`.
- Replace the formula with `superformula(θ, m, n₁, n₂, n₃)`. The outline is the same to the last digit: Wavelace has the formula as a function, which the three Supershape solids use.
- Drag `n₁` to 7, so that all three exponents agree. The star deflates into a gently lobed blob, its radius between 1 and `1.28`.

### Read more

- [Superformula](https://en.wikipedia.org/wiki/Superformula)
- [Superellipse](https://en.wikipedia.org/wiki/Superellipse)
- [Johan Gielis](https://en.wikipedia.org/wiki/Johan_Gielis)
- [Polar coordinate system](https://en.wikipedia.org/wiki/Polar_coordinate_system)
