Experiment #1

In this experiment, we used an ammonite fossil to plot a logarithmic spiral.

To do this we had to:

1. Trace the spiral form as seen on the fossil with tracing paper;

3. Let your starting point be the origin and draw an x and y-axis;

4. Measure every 30 degrees from the x-axis from 0 to 360;

5. Measure the distance from the origin to the point on the spiral at every 30 degree interval;

6. With these measurements, we are now able to plot the results using Maple.

> restart;with(plots):with(stats):plotsetup(inline):readlib(readdata):readlib(readline):

> readline("a:/spirdata");AM:=readdata(`a:spirdata`,2):

[Maple Math]

"AM" stands for ammonite the name of the fossilized mollusk shell used to collect the data.

The graph is in polar form because we used the distance from the origin and angles, rather than x and y.

> plot(AM,coords=polar);

[Maple Plot]

Using seq allows you to select values separately.

Avalues=angles->we multiplied our values by Pi/180 to convert from angles to radians.

> Avalues:=evalf([seq(AM[i,2],i=1..27)]*Pi/180);

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

> Rvalues:=[seq(AM[i,1],i=1..27)];

[Maple Math]
[Maple Math]

> Lvalues:=[seq(ln(AM[i,1]),i=1..27)];

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

The R stands for radius, the A for angle theta and the L for linear.

You can take your separate values and make a list of ordered pairs for plotting.

Rvalues=radius->we took ln of the radii to arrive at a linear equation. This will be clarified further on.

(SP, for spiral.)

> SP:=[seq([Lvalues[n],Avalues[n]],n=1..27)];

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

This is the linear representation of our spiral.

> plot(SP,style=point,symbol=circle);

[Maple Plot]

Now we curve fit the line.

> with(stats):

Using the fit command, we we're able to find the linear equation that best suited the graph.

> eq_fit:= fit[leastsquare[[x,y],y=b*x+a,{a,b}]]([Avalues,Lvalues]);

[Maple Math]

Knowing that a shell's spiral is logarithmic, we were able to convert the equation to linear form by doing the following: [Maple Math] is the equation of a logarithmic spiral where [Maple Math] is the distance from the origin, [Maple Math] is an angle in radians, and [Maple Math] and [Maple Math] are unknown constants. By taking [Maple Math] of both sides we can arrive at a linear equation as follows:

1. [Maple Math]

2. [Maple Math]

3. [Maple Math]

4. [Maple Math]

We can now compare this equation to a linear equation [Maple Math] and replace [Maple Math] with [Maple Math] , [Maple Math] with [Maple Math] and [Maple Math] with [Maple Math] . After solving for a and b in the linear equation, we can solve for a knowing [Maple Math] and plug those values into the original spiral equation in polar form.

> A:=-1.20603005;

[Maple Math]

> b:=0.1348843804;

[Maple Math]

> a:=solve(ln(a)=A,a);

[Maple Math]

> r:=x->a*exp(b*x);

[Maple Math]

We're now ready to plot!

> plot(r(x),x,coords=polar);

[Maple Plot]

Sd represents spiral data. We will now superimpose the spiral that we fitted over our data points.

> Sd:=[seq([Rvalues[n],Avalues[n]],n=1..27)]:

> display(plot(Sd,style=point,symbol=circle,coords=polar),plot(r(x),x=-4..20,color=magenta,coords=polar));

[Maple Plot]

The curve fitting was a success and we now have an equation perfectly describing the ammonite fossil that was used.

 

Home

Introduction

Plot #1

Plot #2

Conclusion

Hosted by www.Geocities.ws

1