The logarithmic, or equiangular spiral is the locus of points corresponding to the locations over time of a point moving further away as it revolves around a fixed point. As such, in polar coordinates \((r, \theta)\) it can be described as follows.

– Logarithmic spiral equation

- \(r = a + e^{b * \theta}\)

In which \(a > 0\) and \(b \ne 0\) are real constants, \(e\) is the base of natural logarithms, \(r\) is the length of the radius from the centre of the spiral and \(\theta\) is the amount of rotation of the radius.

The spiral has the property that the angle \(\phi\) between a radius vector to a point on the curve and the tangent at this point is a constant defined by the following formula, this will help us shape the nautilus afterwards.

– Tangent oN a Logarithmic spiral

- \(tan( \phi) = 1 / b\)

↳ Spiral demo (three.js)

– References

- Tangent on a logarithmic spiral, Wolfram
- Is the nautilus shell spiral a golden ratio ?, Golden Number

The superformula is a generalization of both circle/ellipse and superellipse. In the Cartesian coordinate system, these shapes are described as the set of all points \((x, y)\) on the curve that satisfy the following equations.

– Circle/ellipse equation

- \((x / a)^2 + (y / b)^2 = 1\)

– Superellipse equation

- \(|x / a|^n + |y / b|^n = 1\)

Where \(a\), \(b\) and \(n\) are positive numbers excluding 0. The superformula can be used to describe many complex shapes and curves that are found in nature. In polar coordinates \((r, \phi)\), it can be described as follows.

– Supershape equation

- \(r = \left(\left|\frac{cos(m / 4 * \phi)}{a}\right|^{n_2} + \left|\frac{sin(m / 4 * \phi)}{b}\right|^{n_3}\right)^{-1 / n_1}\)

In which \(a\) and \(b\) (both excluding 0) are ratios from the centre of the supershape. While \(m\) adds rotational symmetry to the shape, curves are repeated in sections of the circle of angle \(2\pi / m\). Finally, choosing different values for \(n_1\), \(n_2\) and \(n_3\) generates different curves allowing us to create symmetric and asymmetric shapes.

Last but least, here's a quick tip to calculate normal at a given point, let's call it \(Q\), in the supershape. To do this, we add add the normalized vector from the previous to the current point on the curve, \(\vec{\scriptstyle{PQ}}\), to the one from the current to the next point on the curve, \(\vec{\scriptstyle{RQ}}\).

– Normal vector tip

- \(\hat{n} = |\vec{\scriptstyle{PQ}}| + |\vec{\scriptstyle{RQ}}|\)

↳ Supershape demo (three.js)

– References

- Supershapes (Superformula), Paul Bourke
- 2D supershapes, The Coding Train
- What's a vector ?, 3Blue1Brown