Mathematica Code for Sea Shell

This seashell is brought to you courtesy of spherical coordinates. Here are the formulas for transforming spherical coordinates to Cartesian coordinates.


x[theta_,phi_,rho_] = rho Sin[theta] Cos[phi];
y[theta_,phi_,rho_] = rho Sin[theta] Sin[phi];
z[theta_,phi_,rho_] = rho Cos[theta];

Using spherical coordinates, we can graph a semicircle of radius 2.


Needs["Graphics`ParametricPlot3D`"]
Clear[x,y,z,theta,phi]
x[theta_,phi_] = 2 Sin[theta] Cos[phi];
y[theta_,phi_] = 2 Sin[theta] Sin[phi];
z[theta_,phi_] = 2 Cos[theta];
ParametricPlot3D[ {x[theta,phi], y[theta,phi], z[theta,phi]},
   {theta,0,Pi}, {phi,0,.1},
   ViewPoint->{1.205, 3.152, 0.245}];

and then we can rotate it about the z axis by letting phi vary from 0 to 2Pi.


Clear[x,y,z,theta,phi]
x[theta_,phi_] = 2 Sin[theta] Cos[phi];
y[theta_,phi_] = 2 Sin[theta] Sin[phi];
z[theta_,phi_] = 2 Cos[theta];
ParametricPlot3D[
   {x[theta,phi], y[theta,phi], z[theta,phi]}, {theta,0,Pi}, {phi,0,2Pi},
   ViewPoint->{1.205, 3.152, 0.245}];

A perfect sphere. Now let's change the radius of the circle as we rotate it around the z axis.


Clear[x,y,z,theta,phi]
x[theta_,phi_] = phi/18 Sin[theta] Cos[phi];
y[theta_,phi_] = phi/18 Sin[theta] Sin[phi];
z[theta_,phi_] = phi/18 Cos[theta];
ParametricPlot3D[
   {x[theta,phi], y[theta,phi], z[theta,phi]},
   {theta,0,Pi}, {phi,0,2Pi},
   ViewPoint->{1.205, 3.152, 0.245}];

Now let's move that semicircle up the z axis as we rotate it.


Clear[x,y,z,theta,phi]
x[theta_,phi_] = phi/18 Sin[theta] Cos[phi];
y[theta_,phi_] = phi/18 Sin[theta] Sin[phi];
z[theta_,phi_] = phi/18 Cos[theta] + phi/6;
ParametricPlot3D[
   {x[theta,phi], y[theta,phi], z[theta,phi]},
   {theta,0,Pi}, {phi,0,6Pi},
   PlotPoints->{15,60}, ViewPoint->{1.205, 3.152, 0.245}];

And there it is! Maybe this is all determined by just one or two genes. If you know more biology than we do, we would appreciate your insights.

Maybe we should read The Algorithmic Beauty of Shells by H. Meinhardt. Springer-Verlag's promotional materials say that the author used mathematical models to explain growth patterns in seashells.