Each student will get individual data for the assignment.

Below is helpful background information for the second *Maple*
assignment. I repeat what I wrote in the last set of instructions:

**You are allowed, and indeed encouraged, to copy and modify the commands discussed here.**

For this assignment you will need commands from the *plots* and
*VectorCalculus* packages. Load these packages using the
*with* command, as discussed in Packages section of the Background Information for the first Maple
assignment.

We will again be using the *spacecurve* command from the *plots* package. For these instructions, we will be using as an example the curve given by:

or if you prefer the parametric notation:

y=2 cos(2t) + 4 cos(t)

z= sin(3t) + 4 sin(t)

I'm beginning with this curve because it is fairly simple. More complicated curves will appear later. This curve is a *closed
curve* (i.e. a loop) on the interval [0,2π] because the formulas are all
combinations of sines and cosines with integers multiplying the
parameter, t.

Since we will be doing a lot with this curve, it's wise to store it to a variable. There are several approaches to doing this, but the best for our purposes is storing it as a "live" function, * r(t)*

*r := t -> < 5*cos(2*t) + 5*sin(t), 2*cos(2*t) + 4*cos(t), sin(3*t) + 4*sin(t)> *

This should allow us to call r(t) simply by typing *r(t)*, but also evaluate r at a value, say t=2, by typing in *r(2)*. (Another option would have been to store the right hand expression directly to r, omitting the "t ->" portion. In this case we would need to use the *subs* command to evaluate r at a specific value.)

Let's start by just graphing our curve.

*spacecurve(r(t),t=0..2*Pi);*

We can use just r(t) because we've already stored the equation to r(t). Notice that we used the capitalization *Pi* to get the constant 3.141... (*pi* and *PI* do not give this constant). The result is the picture shown below.

- The
*thickness*option will make the curve a little thicker and easier to see. The default is*thickess=1*, but let's make*thickess=2*to beef up our curve slightly. - We can make the whole curve a single color, say black. We do this via the option
*color=black*. Current versions of*Maple*have hundreds of pre-set colors ranging from black to beige to SteelBlue. Feel free to experiment, but remember the limitations of your printer for the end result. (For the record*Maple*is Canadian, so it also accepts the "colour" option.) - We will add the standard coordinate axes with the option
*axes=normal*. Other choices for axes include*axes=none*(the default),*axes=boxed*, and*axes=frame*. - We can label the x-, y-, and z-axis with the option
*labels=[x,y,z]*. - We can make the curve smoother using the
*numpoints*option.*Maple*plots curves by evaluating r(t) at many different values for t, and then connecting the dots. A higher numpoints setting makes more dots, thus smoothing the curve but lengthening the computation time. Some experimentation is often necessary to strike a balance. For this assignment*numpoints=150*works well. For contrast, try*numpoints=15*(chunky curve, short computation) and*numpoints=1500*(smoother curve, longer computation). - You can use the mouse to adjust the viewpoint, but you can also use the
*orientation*command. Often the orientation command is not necessary because of the mouse, but it's good to know it's there if you need it. - You can look up the list of all available options for three-dimensional plotting by looking up
*help(plot3d/options)*.

Certainly the view shown is much nicer, and has some readable
quantitative information (on the axes). It is still a bit
deceptive, however, at the center. The picture seems to show the curve intersecting itself. In
fact, this particular curve does *not* have any
self-intersections. This is what's called a *simple closed
curve*. If you right-click on a *Maple*
picture, the **Manipulator** button allows you to **rotate** or
**scale** or **pan**. So you can get many different views. Here
is a view which shows the same curve from a different angle, and zoomed out farther. Apparently this curve does *not* intersect
itself!

Consider the following picture of the curve, s(t)=< sin(2t), cos(2t), sin(t) >

**Warning:** There are curves which do not intersect themselves,
but have the irritating (interesting?) property that *every* two dimensional
view shows intersections! See the bottom of this page for examples. For example, q(t)=<sin(t),cos(3t),sin(2t)> (animated below) has this property. In this case you would include several views of your curve to convince the reader that there are *no* intersections.

Watch as intersections appear and disappear. Compare this to a curve with an actual intersection, such as s(t)=<sin(2t), cos(2t), sin(t)> above where the intersection does not disappear. More examples of such curious curves appear at the bottom of this page.

We can try various views to get the *size* of the curve. Two
images are shown below (here we used the "axes=frame" option instead of "axes=normal"). The image on the left has the z-axis sticking directly out from the
viewing plane, so we are looking down from above. Alternately, you can see this as projecting (i.e. squashing) the curve into the xy-plane. The image on the right has the y-axis sticking directly out from the viewing plane. Therefore it shows a picture of the curve squashed
into the xz-plane.

From these pictures I can get a rough idea of the dimensions of this curve. Apparently the curve fits inside a box with -10≤x≤6 and -3≤y≤6 and -3.6≤z≤3.6, as illustrated below. You may draw such markings by hand.

How long is this curve? This is called the arc length, which is calculated by integrating the speed of r(t) for the desired range of t (i.e. ∫_{a}^{b} |r'(t)| dt ). We need to differentiate r(t), and then find its length or magnitude (this is the *speed*). The *diff* command will differentiate r(t). The *VectorCalculus* package contains a command called *Norm* which computes the norm of a vector. We will use the variable *speed* to represent |r'(t)|.

*
speed:=Norm( diff(r(t),t) );
*

We are interested in the length of one loop of the curve. For our curve "one loop" is given by the range 0 ≤ t ≤ 2π, so we need to integrate

*Maple* needs to be "convinced" to evaluate this integral
approximately. You can do this via:

* evalf(Int(speed,t=0..2*Pi));
*

Please note the capital

**Warning:** Do not confuse the *Norm* command in *Maple* with Norm from *This Old House* and *The New Yankee Workshop*, nor with Norm from *Cheers*. One is a command, one is a carpenter, and one is a carouser.

The *VectorCalculus* package also contains the *Curvature* command,
which computes the curvature of a curve.
The curvature is often a very messy formula:

* Curvature(r(t),t);
*

Ugh. This is certainly an example of why people use

We can compute the curvature at, for example, t=2 using the *subs* command.

*
evalf( subs(t=2, Curvature(r(t),t) ));
.2586332282*

The

The curvature expression for r(t) is a (complicated) real-valued function of t, so we can *plot* it like any other one-variable real-valued function.

*plot(Curvature(r(t),t),t=0..2*Pi,thickness=2);*

To graph a point, in our case the *most curvy point*, we can use the *pointplot3d* command (in the *plots* package). For example, try
*
pointplot3d([-9.994,-2.086,-3.001], symbol=box, symbolsize=20, color=blue);
*
You will get a thoroughly unhelpful picture (although it's more interesting than if you do not include any of the options), since this point is only meaningful relative to the curve r(t). Use the *display* command
(discussed in the
Background for the first assignment)
to plot both the curve and the point together.

*
POINT:=pointplot3d([-9.994,-2.086,-3.001], symbol=box, symbolsize=20, color=blue):
CURVE:=spacecurve(r(t),t=0..2*Pi,thickness=2, color=black, axes=normal, labels=[x,y,z], numpoints=150):
display({MCP,CURVE});
*

I chose the example above to analyze in detail because it is fairly simple. You will get randomly generated curves which may be a bit more wild. You have been given the curvature of your curve at t=2, so that you can check initially that you've entered the functions correctly.

Some strange things can happen. Let me show you a few of them.

Below is a plot of curvature for a curve which isn't very nice. The curvature has an enormous thin peak. Experiments seem to show that such behavior is common.

Below are three pictures of another curve. I emphasize that these are
all pictures of the *same* curve. This curve does *not*
intersect itself, but every two dimensional view does seem to show an
intersection. So detecting intersections by "just looking" may be a
bit difficult. Some examination of the images is necessary.

I am very curious to learn if this homework assignment will lead to
any bizarre pictures and numbers. Please tell me if you think you have
found some.

I thank Ms. L. Pudwell for several useful conversations about this
material.

**Note on torsion:** After experiments with some students, I am *very*
glad that torsion (roughly the twistiness of the curve) was not mentioned in this assignment! The torsion
computations are quite elaborate, taking large amounts of
memory and computational time. I think we could have frozen huge
chunks of university computer resources with any general requests for
torsion. I know that I caused my computers at home and at school to be
very unhappy by asking for the torsion of some students' curves.

**
Maintained by
greenfie@math.rutgers.edu and last modified 8/3/2009 by Andrew Baxter.
**