# Supershape Pagoda

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

`(cos(u) · superformula(v − π/2, 4 · k, n₁, 5, 5) · sin(v),  −superformula(v − π/2, 4 · k, n₁, 5, 5) · cos(v),  sin(u) · superformula(v − π/2, 4 · k, n₁, 5, 5) · sin(v))`

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

### What it draws

Gielis's superformula `r(ϑ) = (|cos(mϑ/4)|^n₂ + |sin(mϑ/4)|^n₃)^(−1/n₁)` gives a radius for each angle, as the preset Gielis Supershape shows in the plane. Wavelace has it as a function, `superformula(θ, m, n₁, n₂, n₃)`, which computes exactly this. A solid takes two of them multiplied: one around the vertical axis for the section and one from bottom to top, with `φ = v − π/2`, for the profile.

Here the section is a plain circle. With `m = 0` the formula is `(1 + 0)^(−1/n₁) = 1` whatever the exponents are, so the section factor is just `cos u` and `sin u`, and the solid is a surface of revolution. Everything it shows is in the profile.

### Where the rims come from

The profile is `superformula(v − π/2, 4k, n₁, 5, 5)`, with `n₁ = 1.6` on a slider. Its `m = 4k = 14`, with `k` on a slider at 3.5. Its radius swings between 1 and 1.92. It is largest where the cosine and sine terms are equal, at `3.5φ = π/4 + jπ/2` for each whole number `j`.

Over the half turn from bottom to top that happens six times, at `φ ≈ ±0.22, ±0.67` and `±1.12`. Turned about the axis, each maximum becomes a flat rim and each minimum a waist between two.

Near the top the profile still swings, but `cos φ` shrinks it toward the axis. What is left of the last lobe opens as a cup, and the final stretch to the pole rises as the spike in its middle.

### Try

- Press `Front` in the deck. The outline is the profile itself, the six rims seen edge on.
- Drag `k` to 1, which is `m = 4`. Only two rims are left, at `φ ≈ ±0.79`.
- Drag `n₁` to 4. The rims round off into gentle bulges, the radius now reaching only 1.30.
- Turn `Mesh` down from its top stop to see the rings and meridians of the wireframe underneath.

### Read more

- [Superformula](https://en.wikipedia.org/wiki/Superformula)
- [Surface of revolution](https://en.wikipedia.org/wiki/Surface_of_revolution)
- [Superquadrics](https://en.wikipedia.org/wiki/Superquadrics)
