# Logarithmic spiral

The nautilus shape is often associated with a spiral or even the golden ratio. In order to create our own, we will create a logarithmic spiral and use its properties to structure the nautilus shell. ## Spiral definition

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)

## Superformula

Based upon equations by Johan Gielis and research of Paul Bourke, we will learn how to generate 2D supershapes. Then, we will design a nautilus shell by placing them along our logarithmic spiral. ## 2D supershape definition

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. ## Normal on a given point

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)

## Supershape function

– References

In the next chapter, we will design our nautilus in 3D by interpolating supershapes along our logarithmic spiral.

I'm available to work and collaborate :),
follow me on Vimeo, Instagram or Github.

20 rue du Clos Luce,
92400 Courbevoie

hbruvry@gmail.com
+33 (0)7 87 57 48 91