Seashell Shapes

Make an interactive widget for exploring the shapes of seashells.

Run the code to plot a circle:

SHOW/HIDE DETAILS

As u goes from 0 to 1, {Cos[u 2π], Sin[u 2π]} traces out a circle:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Plot the circle in 3D:

SHOW/HIDE DETAILS

Plot a circle in the x-z plane in 3D:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Plot a logarithmic helix:

SHOW/HIDE DETAILS

Heres a plot of a 2D logarithmic spiral. Its radius increases exponentially:

In[1]:=
X
Out[1]=

Heres a plot of the 3D analog, a logarithmic helix. The spiral rises up the z axis as it unwinds:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Plot a shell shape:

SHOW/HIDE DETAILS

Make a shell shape by sweeping a circle along a logarithmic helix. One side of the circle stays tangent to the z axis (drag the figure to view it from a different angle):

Out[1]=

Well combine the following two plots to make the seashell shape. The parameter u controls the path around the circle, and v the progress along the helix:

In[1]:=
X
Out[1]=

As the circle sweeps out the shell shape, it rotates so that it stays orthogonal to the helix, its radius changes so that one side of the circle stays on the z axis, and its center follows the helix.

Heres the circle:

In[2]:=
X
Out[2]=

To make the center follow the path of the helix, translate it to the point on the helix by adding the expression for the helix to the expression for the circle. This doesnt yet look like a seashell because the circle is not yet rotating or changing radius:

In[3]:=
X
Out[3]=

Next, make the circle rotate as it follows the path of the helix. The helix point is at angle 2πv. RotationTransform[2πv,{0,0,1}] rotates the circle by 2πv about the z axis ({0,0,1}). Evaluate greatly speeds up the calculation by evaluating the rotation before its plotted:

In[4]:=
X
Out[4]=

Finally, scale the circle so that it stays tangent to the z axis as it rotates. The scale factor is the distance of the helix from the z axis, .5^v. PlotRangeAll ensures that the entire shell is plotted (try removing it to see what happens):

In[5]:=
X
Out[5]=

To get a smoother shape, increase the number of plot points in the u and v directions with PlotPoints. Experiment with smaller values to see the effect:

In[6]:=
X
Out[6]=

Remove the axes, box, and surface mesh:

In[7]:=
X
Out[7]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make it interactive. Drag the slider to stretch the shell vertically:

SHOW/HIDE DETAILS

Make the shell expression interactive by wrapping it with Manipulate, adding a stretch parameter, and letting the stretch vary from 0 to 4 with an initial value of 1. The stretch parameter effectively scales the helix along the z axis, compressing or stretching the shell:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Add a control for the width. Drag the slider to change the width of the shell:

SHOW/HIDE DETAILS

Add a parameter that makes the circle move away from the z axis as it sweeps. The slider controls how quickly it moves away:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Add a control for scaling. Drag the slider to change how quickly the shell scales down:

SHOW/HIDE DETAILS

Add a parameter that controls how quickly the circle scales down as it moves around the helix:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Add a control for transparency. Drag the slider to make the shell transparent:

SHOW/HIDE DETAILS

Add a control for transparency. As the transparency goes from 0 to 1, the opacity goes from 1 to 0:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Share ItMake an interactive website for exploring seashell shapes:

SHOW/HIDE DETAILS

Deploy the Manipulate to the Wolfram Cloud where anyone with a browser can use it:

In[1]:=
X
Out[1]=

Click the link in the output to visit the site.

Share the link by right-clicking it and choosing Copy Address. Paste the link into an email, tweet, or other message.

HIDE DETAILS
In[1]:=
X
Out[1]=