# Supershape Urchin

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

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

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

### What it draws

One formula, used twice. Gielis's superformula `r(ϑ) = (|cos(mϑ/4)/a|^n₂ + |sin(mϑ/4)/b|^n₃)^(−1/n₁)` draws a closed outline around a point: a star, a flower or a polygon, as the preset Gielis Supershape shows in the plane.

Here it is taken once around the vertical axis, with `u` as the angle, for the section a horizontal cut would show. It is taken again from bottom to top, with `φ = v − π/2` as the angle, for the profile a vertical cut would show. Each point is the two radii multiplied, placed as on a globe: `r₁(u)·cos u · r₂(φ)·cos φ` across and `r₂(φ)·sin φ` up.

Wavelace has it as a function: `superformula(θ, m, n₁, n₂, n₃, a, b)` computes exactly the radius above, and `a` and `b` may be left out, when they are 1. The section's `m = 16` stays a number, because a section closes round the axis only for a whole `m`. The profile's is `4k`, with `k` on a slider opening at 4, since 16 is past the 10 a slider reaches. The exponent `n₁` is a slider too.

### Where the spikes come from

With `m = 16` the outline repeats 16 times a turn. The exponent `−1/n₁` with `n₁ = 1.2` is steep. Where the two terms are equal the sum is smallest and the radius jumps, so each repeat becomes a spike rather than a bump.

Around the axis the section runs from 0.76 to 1.92: 16 spikes. The divisors `a = 1.1` and `b = 0.92` make them lean, since the cosine and the sine are no longer weighed alike. Up the height the profile covers half a turn, so it gives 8 tiers, its radius between 1 and 1.78.

### History

Johan Gielis published the superformula in 2003 as one rule for many shapes in plants and shells. Multiplying two outlines this way is the spherical product Alan Barr used for superquadrics in 1981, which is how the superellipsoid becomes a solid.

### Try

- Turn `Mesh` down from its top stop to see the wireframe the solid is built on.
- Press `Top` in the deck. The section alone, a 16-pointed star leaning one way.
- Drag `n₁` to 3. The spikes soften into rounded bumps, the profile's radius now reaching only 1.26.
- Drag `k` to 2 for 4 tiers instead of 8, or to 6 for 12.
- Set `Span of v (×π)` to 0.5. Only the lower half is drawn, open at the waist, so the tiers can be seen from inside.

### Read more

- [Superformula](https://en.wikipedia.org/wiki/Superformula)
- [Superquadrics](https://en.wikipedia.org/wiki/Superquadrics)
- [Superellipse](https://en.wikipedia.org/wiki/Superellipse)
- [Spherical coordinate system](https://en.wikipedia.org/wiki/Spherical_coordinate_system)
