WD

A tunnelling shell surface

In the previous article about a shell surface, we gained an intuition about how we can generate a surface from a spiral. In this article, we take this idea one step further.

Our problem statement for this article is:
Discover a parametric equation for the surface of a shell such that a sequence of ellipses grows along its primary spiral.

The concept of growth #

The act of growing causes change. But underneath this change, there are constant values that can predict the growth rate. We use these values as a model for growth, the exponential function g:RRg: \reals \mapsto \reals,

Where

We need constant values for pp and qq to get a growth function that ranges over θ\theta. Although we used the term parameter to describe gg, note that g(θ,,)g(\theta,\cdot,\cdot) is a normal function that can be plotted using Cartesian coordinates on the XY plane.

A seashell growth model #

We divide the surface growth of a shell into two parts. The growth of the primary spiral and the growth of the ellipse.

Think about the ellipse as a flat organism that creates a tunnel along the primary spiral of the shell. As the shell grows, the organism also grows (but it does not get taller). Imagine that the organism excretes from every point on its boundary, the material that becomes the shell. This is of course not a biological theory. It is just an analogy we use to help us to work out some mathematics.

In this organism based model, we place a constraint that the primary spiral must grow symmetrically on the XY plane. This means that when you view it from the top, you get a spiral that grows evenly in all directions. This view from the top can be seen in fig. 1 (far below). We also want the spiral to grow in 3D. It grows downwards on the Z axis so that it fits naturally in the standard Cartesian space - with the tip on the top.

Generally speaking, growth is a function of time. In our model, the organism starts at the centre (of the spiral) and it revolves around that centre as time goes on. After some time goes by it reaches a full revolution (i.e. 2π2\pi radians or 360°360\degree). So, instead of using the time to describe change, we use the rotation angle of the primary spiral. This is our primary parameter, and we name it α\alpha.

Figure 1 depicts the concept of growth as a function of the angle in the XY plane (top view). Note that α\alpha increases in an anti-clockwise direction (a common mathematical notion to measure angles). The figure shows some points on the curve for different values of the parameter. Notice how the length of the red line grows with an ever-increasing α\alpha value. This length is the radius of the shell (viewed from the top).

Now that we have the spiral concepts down, we turn our attention to the ellipse. In our model, we decide that we do not want the flat elliptical organism to grow symmetrically. So we have to define growth directions. Imagine that the organism looks outward, and it can orientate itself so that it has an east side (left) and a north side (up). The north-south (NS) growth can now be different from the growth in the east-west (EW) direction. So we have the possibility of asymmetrical growth. To plot an ellipse, we need another parameter that goes through a single revolution (that is 2π2\pi). This is our second parameter, and we call it β\beta.

Putting these ideas together, we need 8 constants to describe the growth of our mathematically modelled seashell. The mathematical expressions are much simpler if we name them here and use them throughout the rest of this article:


Fig 1: Spiral growth in XY plane

XY growth #

Figure 1 is an example of a spiral that describes the XY growth, but what is the equation for it? The key lies in the observation that the length of each red line is the radius of the spiral at some α\alpha. In other words, the red line shows the radius at alphaalpha.

If we have the radius rr and some angle θ\theta we could calculate the coordinates of a point pR2p \in \reals^2. We use the very basic trigonometry where x=rcosθx = r \cos \theta and y=rsinθy = r \sin \theta.

But we know (from eq. 1 and our defined model) that the value rr is a function that depends on α\alpha,

So we can combine these ideas to get a parametric function that determines a point on the XY plane, cxy:RR2c_{xy}: \reals \mapsto \reals^2

We use cc to indicate that the function is a curve. The notation [x,y][x,y] shows coordinates. So, we can also write eq. 3 (roughly) as two separate functions

This is the function that is plotted out in figure 1.

Into the third dimension #

The growth along the Z axis has only one dimension, and it comes directly from eq. 1. There is one change, we want the spiral to go down the Z axis. So, we end up with gcd:RRg_{cd}: \reals \mapsto \reals

This function is the zz component of a 3D spiral when we merge eq. 4 and eq. 3. The result is the parametric function for the curve of the primary spiral is cp:RR3c_p: \reals \mapsto \reals^3

It might look a little complicated, but we can think of it as three relatively simple functions. One for each component of the 3-D Cartesian coordinate system.

The orientation of the spiral #


Fig 2: Orientation along the primary spiral
(see also the interactive view)

In our analogy the ellipse is formed by the organism as it moves along the curve, cp()c_p(\cdot). We imagine an organism that is looking in the direction of the curve, and it is aligned with a plane that is orthogonal to that.

Recall that the derivative of any function is the slope of the function. The slope also determines the direction of the change. So, we can use the derivative to calculate the look-at direction of the organism. The blue arrow in figure 2 shows this direction for a few chosen value of α\alpha. See how this arrow aligns with the curve? It is just the derivative calculated at that point.

The derivative of any parametric function is obtained by calculating the derivative of each coordinate component. In our case the components are independent (orthogonal), so the calculation is straightforward.

Because we are interested in the direction only, we can start with vf()=cp()v_f(\cdot) = c_p'(\cdot) as the forward vector. We can multiply (or divide) all three components with any factor and still end up with the same direction vector. This is handy because it allows us to simplify the algebraic expressions a bit.

We now need the EW and NS vectors for the ellipse. These are also shown in fig. 2 respectively as the green arrow and the red arrow. For our imagined organism, green points right, red points upward and blue points forward.

The right direction is determined by looking away from the Z axis. If you take a point on the spiral, the direction away from the Z axis is the X and Y component of that point, with Z zero. Notice the values are taken from eq. 5, and we get a vector for right at α\alpha:

Again, because we work with a direction vector, we can simplify. This time the gain is more substantial.

Now that we have values for forward and left we can use the cross product[1] to determine the up vector. After some simplification, we end up with

The growing ellipse #

A flat ellipse placed on the XY-plane with a left radius of rxr_x and an up radius of ryr_y has this parametric equation:

Where β[0,2π]\beta \in [0,2\pi] is the angular parameter that sweeps through one revolution

For the xx value of our ellipse we have the growth function (from eq 1):

And for the yy value of our ellipse, we have

Using these as substitutes into eq. 10, we get a parametric function for our ellipse:

The orientated ellipse #

To cast the ellipse into 3-D space, we consider what happens to any point that is transformed around the origin when we apply orientation equations to it. What happens is that we take the X component of the point and multiply that with the right unit vector. And then the Y component is multiplied with the up unit vector. Let's call this function the angular translation, ta:R2R3t_a: \reals^2 \mapsto \reals^3


Where txt_x and tyt_y are the orthogonal unit vectors in 3D space to which we want to go.

The problem is that a unit vector is needed for ta()t_a(\cdot). This is a vector divided by its length. There is some good news; vr()v_r(\cdot) (Eq. 8) is already a unit vector (because cosθ+sinθ=1\sqrt{\cos^\theta + \sin^\theta} = 1). It is only the unit vector for up that we have to worry about and the algebra gets a bit convoluted.

From eq. 9, we get this function that produces a unit vector:

Substituting this and vr()v_r(\cdot) into eq. 12 we get a general angular translation function:

But we are interested in a specific translation. We want to translate the ellipse, not any arbitrary point. So we can substitute the components from eq. 11 into t()t(\cdot) to get is the function for the oriented ellipse:

Final translation #

What remains is to combine our oriented ellipse with the primary spiral, eq. 5. This is easily done, we just start with the spiral position and add the orientated vector:


Fig 3: A mathematical seashell

And here in figure 3 we see a shell rendered using this final parametric equation. For an interactive view of this 3D image, click here.

Conclusion #

We started with exploring the problem and found 8 constant values that describe seashell growth. Then we discovered a function for the growth of the primary spiral. Using this function, we described how to determine the orientation of the spiral as it grows. And finally, we employed the orientation to affix a growing ellipse on each point of the spiral.

Indeed, the result is not a short algebraic expression, but it is also not rocket science.

References #

  1. Cross product - Wikipedia