Our goal is to use Mathematica to help determine the amount of power required to
propel a highly-maneuverable, 5000-ton destroyer. The question that we, and
any designer, must ask is ``how maneuverable?'' We will answer this question
by specifying a tight trajectory that we would like the destroyer to be able to
follow in the water, and then analyzing the amount of power required to follow
it. We will specify this trajectory as a parametric curve.
All of the plots that we have considered to this point have been alike in one
important respect. In each of them, we have let some variable x range along
the horizontal axis, and some function f(x) range along the vertical axis.
The resulting curve has shown us how f(x) changes as x varies within some
range. This is probably the most familiar kind of two-dimensional plot.
In a parametric plot, we let some function f(t) range along the horizontal
axis, and we let some other function $g(t) range along the vertical axis. We
the graph all of the x-y coordinates of the form (f(t), g(t)) as t ranges
through some set of values. For example
ParametricPlot[ {Sin[t], Cos[t]} ,{t, -Pi, Pi},
AspectRatio-> 1];
is a parametric plot that produces a circle (without setting the Aspect Ratio to 1 it would have looked like an ellipse because of Mathematica's drawing conventions).
What the graph tells us is that
as t ranges from -Pi to Pi, the points (sin(t), cos(t)) trace a unit
circle in the plane. This, of course, is a consequence of a familiar
trigonometric identity. Notice one key aspect of a parametric plot: the
parameter (in this case t) does not appear anywhere in the graph.
Look carefully at the Mathematica command that produces the parametric plot. How
do the arguments to this Mathematica differ from a regular x-y plot?
Click here for the answer
Suppose that we want our destroyer to be able to start 100 meters to the right
of the origin and then trace the following parametrically-defined trajectory as
t ranges from 0 to 26. We are measuring t in seconds and the x-y
coordinates in meters. The x-coordinate of the destroyer's position at any
time tis given by the following function xpos.
xpos [ t_] :=
100.0467117 - 1.008227556*t - .0590081133*t^2 - .3203907381*t^3 +
.04967665410*t^4 - .003241565724*t^5 + .00009872376372*t^6 -
.000001144069263*t^7
The y-coordinate of the destroyer's position at any time t is given by the
following function ypos.
ypos[t_] :=
.6252845748 + 26.50816256*t + 1.661930048*t^2 -
.5439457873*t^3 + .04827296491*t^4 - .002227053810*t^5 +
.00005087332227*t^6 - .0000004456469107*t^7
Let's begin by looking at the x and y positions of the destroyer individually,
which doesn't require a parametric plot. First we'll look at how the y
position varies with time:
Plot[ypos[t], {t, 0, 26} ,
PlotLabel -> "Destroyer Vertical Trajectory"];
Now let's look at how the xpos position varies with time. You'll need to
mentally turn this plot sideways, since the x position will be displayed on the
vertical axis!
Plot[xpos[t], {t, 0, 26} ,
PlotLabel -> "Destroyer Horizontal Trajectory"];
If we want to see the overall path of the destroyer through the x-y plane, we
need to use a parametric plot:
Click here for the answer
ParametricPlot[ {xpos[t], ypos[t] }, {t, 0, 26},
PlotLabel -> "Destroyer Trajectory"];
Although you can't tell this from the position plot, at time 0 the destroyer is
moving north at around 27 meters/second (60 miles/hour), and at time 26 it is
moving in the opposite direction at around 25 meters/second (56 miles/hour).
It manages to reverse course in a space of 200 meters. This wouldn't be a very
fancy maneuver for an automobile, but for a 5000 ton destroyer it is quite a
feat!
Be sure that you understand the correlation between the three plots position
before continuing.