Quick Maple worksheet to produce graphs of ellipse,  and elliptical spiral,  

for solutions for Homework No. 1 

 

First, for simplicity, let us simply look at the 2-dimensional projection of this motion  

into the x,y-plane. 

         We define the 2-dimensional portion of the  

curve as a parametric equation; below is the syntax to do this: 

> `:=`(nm, [cos(tau), `*`(B, `*`(sin(tau))), tau = 0 .. `+`(`*`(2, `*`(Pi)))]); 1
 

[cos(tau), `*`(B, `*`(sin(tau))), tau = 0 .. `+`(`*`(2, `*`(Pi)))] (1)
 

The equation above has an arbitrary parameter in it, the ratio of the semiaxes in the two directions. 

 Since we must insert  a value for this parameter,  

the syntax below creates a collection of ellipses  

with 4 different, specific values for this ratio. 

> `:=`(nms, seq(subs(B = `+`(`*`(`/`(1, 2), `*`(j))), nm), j = 1 .. 4)); 1
 

[cos(tau), `+`(`*`(`/`(1, 2), `*`(sin(tau)))), tau = 0 .. `+`(`*`(2, `*`(Pi)))], [cos(tau), sin(tau), tau = 0 .. `+`(`*`(2, `*`(Pi)))], [cos(tau), `+`(`*`(`/`(3, 2), `*`(sin(tau)))), tau = 0 .. `+`(`*... (2)
 

The command below then produces a plot with each of these distinct, specific ellipses. 

  Note the use of the "character" \n  (in the title command),  

                   which gives a carriage return inside the title name. 

  Also note one may use Greek characters for labelling, by using the SYMBOL font. 

  Also note the use of the command scaling=constrained,  

                  which insists on the same length scale for both axes, thereby  

                                                  making the "eye" see it more naturally. 

> plot([nms], x = -1.5 .. 1.5, -2.5 .. 2.5, scaling = constrained, labelfont = [SYMBOL, 12], labels = [
plot([nms], x = -1.5 .. 1.5, -2.5 .. 2.5, scaling = constrained, labelfont = [SYMBOL, 12], labels = [
 

Plot_2d
 

However, now let's go ahead and produce something with the full 3-dimensional. 

This will in fact be rather more difficult to visualize; however, inside a true  

Maple file one may use the cursor to actually rotate the displayed graph around  

any axis desired, to achieve a better perspective on it. 

 

Here, of course, we will now need two parameters, the new one specifying the  

speed of vertical rise, as described in the textual material. 

> `:=`(nms, [cos(t), `*`(B, `*`(sin(t))), `*`(W, `*`(t))]); 1
 

[cos(t), `*`(B, `*`(sin(t))), `*`(W, `*`(t))] (3)
 

> `:=`(nmsq, [seq(subs([B = `+`(`*`(`/`(1, 2), `*`(j))), W = `+`(`*`(`/`(1, 10), `*`(j)))], nms), j = 1 .. 4)]); 1
 

[[cos(t), `+`(`*`(`/`(1, 2), `*`(sin(t)))), `+`(`*`(`/`(1, 10), `*`(t)))], [cos(t), sin(t), `+`(`*`(`/`(1, 5), `*`(t)))], [cos(t), `+`(`*`(`/`(3, 2), `*`(sin(t)))), `+`(`*`(`/`(3, 10), `*`(t)))], [cos... (4)
 

The object above is a "list" of 3-dimensional curve commands. 

The command below shows how to extract a single element from that list: 

> nmsq[2]; 1
 

[cos(t), sin(t), `+`(`*`(`/`(1, 5), `*`(t)))] (5)
 

Next we want to plot one or more of them.   

They are a little complicated to plot all together on the same set of axes,  

so I will display (just) two of them, separately. 

 

The command to plot a 3-dimensional curve lives in a Maple "package" called plots. 

It must be "loaded" before it can be used, as is done just below. 

> with(plots); 1
 

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
(6)
 

> spacecurve(nmsq[2], t = 0 .. `+`(`*`(4, `*`(Pi))), scaling = constrained, labelfont = [SYMBOL, 12], labels = [
spacecurve(nmsq[2], t = 0 .. `+`(`*`(4, `*`(Pi))), scaling = constrained, labelfont = [SYMBOL, 12], labels = [
 

Plot
 

> spacecurve(nmsq[4], t = 0 .. `+`(`*`(4, `*`(Pi))), scaling = constrained, labelfont = [SYMBOL, 12], labels = [
spacecurve(nmsq[4], t = 0 .. `+`(`*`(4, `*`(Pi))), scaling = constrained, labelfont = [SYMBOL, 12], labels = [
 

Plot
 

> Typesetting:-mrow(Typesetting:-mo(
 

The command above is NOT part of this document, exactly, but, rather, shows a way to acquire more informtation concerning plot options, for 2-dimensional plots.  Use plot3d  

for 3-dimensional plots. 

>