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):
We’ll 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:
{
ParametricPlot3D[{Cos[u 2 \[Pi]], 0, Sin[u 2 \[Pi]]}, {u, 0, 1}],
ParametricPlot3D[.5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v], 1}, {v, 0,
4}]
}
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.
Here’s the circle:
ParametricPlot3D[{Cos[u 2 \[Pi]], 0, Sin[u 2 \[Pi]]}, {u, 0, 1}, {v,
0, 4}]
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 doesn’t yet look like a seashell because the circle is not yet rotating or changing radius:
ParametricPlot3D[{Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]} + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v], 1}, {u, 0,
1}, {v, 0, 4}]
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 it’s plotted:
ParametricPlot3D[
Evaluate[RotationTransform[2 \[Pi] v, {0, 0, 1}][{Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]}] + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v], 1}], {u,
0, 1}, {v, 0, 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):
ParametricPlot3D[
Evaluate[RotationTransform[
2 \[Pi] v, {0, 0, 1}][.5^v {Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]}] + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v],
1}], {u, 0, 1}, {v, 0, 4}, PlotRange -> All]
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:
ParametricPlot3D[
Evaluate[RotationTransform[
2 \[Pi] v, {0, 0, 1}][.5^v {Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]}] + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v],
1}], {u, 0, 1}, {v, 0, 4}, PlotRange -> All,
PlotPoints -> {20, 40}]
Remove the axes, box, and surface mesh:
ParametricPlot3D[
Evaluate[RotationTransform[
2 \[Pi] v, {0, 0, 1}][.5^v {Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]}] + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v],
1}], {u, 0, 1}, {v, 0, 4}, PlotRange -> All,
PlotPoints -> {20, 40}, Axes -> None, Boxed -> False, Mesh -> None]
ParametricPlot3D[
Evaluate[RotationTransform[
2 \[Pi] v, {0, 0, 1}][.5^v {Cos[u 2 \[Pi]], 0,
Sin[u 2 \[Pi]]}] + .5^v {Cos[2 \[Pi] v], Sin[2 \[Pi] v],
1}], {u, 0, 1}, {v, 0, 4}, PlotRange -> All,
PlotPoints -> {20, 40}, Axes -> None, Boxed -> False, Mesh -> None]