VC.01 Vectors Point the Way
TUTORIALS

\(Off[General::spell]; 
\(Off[General::spell1]; \)\)\(Off[ParametricPlot3D::ppcom]; 
Off[ParametricPlot::ppcom]; 

    Off[Plot::plnr]; 
SetOptions[Limit, Analytic -> True]; \)

CMView = {2.7, 1.6, 1.2};

Vector Drawer

BeginPackage["Vector3D`", "Graphics`Colors`"];

\(Axes3D::"usage" = 
      "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8]."; 

    \(Perpend::"usage" = 
      "Perpend[a] returns a unit vector which is perpendicular to the vector a."; \)\)Arrow::"usage" = 
      "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. \
Arrow[a, Tail -> tail] gives a vector from tail to a."; Vector::"usage" = 
      "Vector[a, b] gives a 2D or 3D vector from a to b."; ArrowHead::"usage" = 
      "ArrowHead[a, vec] produces an arrowhead with its tip placed at the \
point a, pointing in the direction of the vector vec."; Tail::"usage" = 
      "Tail -> point puts the tail of the vector at point."; Norm::"usage" = 
      "Norm[vec] returns the Euclidean length of vec."; Normalize::"usage" = 
      "Normalize[vec] returns a unit vector in the direction of vec, \
provided vec is nonzero."; Aperture::"usage" = 
      "Aperture is the ratio of the radius of the base to the length of the \
head of a vector."; TipSize::"usage" = 
      "TipSize specifies an absolute size for the inner tip length of the \
head of a vector."; TipRatio::"usage" = 
      "TipRatio is the ratio of the inner length of the arrowhead to the \
length of the shaft of a vector."; HeadRatio::"usage" = 
      "HeadRatio is the ratio of the outer length of the arrowhead to the \
length of the shaft of a vector."; HeadSize::"usage" = 
      "HeadSize specifies an absolute size for the head of a vector."; 
    ScaleFactor::"usage" = 
      "ScaleFactor specifies the amount to scale a vector in length and may \
be either a number or a pure function."; ZeroVectorPointSize::"usage" = 
      "ZeroVectorPointSize is the size of the point used to represent a \
zero vector."; Options[Vector] = 
      Options[Arrow] = 
        Options[ArrowHead] = {HeadRatio -> 0.18, 
            TipRatio -> 0.14, Aperture -> 0.3, 
            ScaleFactor -> 1, HeadType -> Polygon, 
            ShaftQ -> True, EdgesQ -> True, 
            VectorColor -> RGBColor[0, 0, 1], ShaftWidth -> 0.005, 
            ZeroVectorPointSize -> 0.01}; Begin["`Private`"]; SetOptions[ParametricPlot, AspectRatio -> Automatic]; SetOptions[Plot, AspectRatio -> Automatic]; SetOptions[Graphics, AspectRatio -> Automatic]; Axes3D[u_, v_] := 
      Graphics3D[{{Blue, Line[{{-(u/3), 0, 0}, {u, 0, 0}}]}, 
          Text["x", {u + v, 0, 0}], {Blue, 
            Line[{{0, -(u/3), 0}, {0, u, 0}}]}, 
          Text["y", {0, u + v, 0}], {Blue, 
            Line[{{0, 0, -(u/3)}, {0, 0, u}}]}, 
          Text["z", {0, 0, u + v}]}]; Axes3D[u_] := Axes3D[u, (u/8)]; Norm[a_?VectorQ] := N[(Sqrt[a . a])]; Normalize[a_?VectorQ] := If[a . a == 0, a, (a/Norm)[a]]; Perpend[a_?VectorQ] := 
      Normalize[{a[[2]], 
            -a[[1]]}] /; 
        Length[a] == 2Perpend[a_?VectorQ] := 
      Normalize[
          If[a[[1]] == 0, {1, 0, 0}, {0, 
              a[[3]], 
              -a[[2]]}]] /; 
        Length[a] == 3Base3D = 
      Table[{Cos[((2 k π)/8.) ], Sin[((2 k π)/8.) ]}, {k, 0, 
          8}]; Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = 
            {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, 
                  TipRatio, Aperture, ScaleFactor, VectorColor, 
                  ZeroVectorPointSize} /. {opts} /. Options[Vector]; 
          If[from == to, 
            Return[Graphics[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]; tr = 0.75 hr]; 
          If[NumberQ[ts], tr = (ts/Norm)[diff]]; 
          Graphics[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              With[{trans = ap hr Norm[diff] Perpend[diff]}, {vc, 
                  Thickness[sw], 
                  ht[{tip, tip - hr diff + trans, tip - tr diff, 
                      tip - hr diff - trans, tip}]}]}]] /; 
        Length[from] == Length[to] == 2Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, eq, sw, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = 
            {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, 
                  ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts}
                   /. Options[Vector]; 
          If[from == to, 
            Return[Graphics3D[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]]; tr = (hr/2); 
          Graphics3D[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              If[eq, {}, EdgeForm[]], {SurfaceColor[vc], 
                With[{temp = Perpend[diff]}, 
                  (Polygon[Append[#1, tip]]&)/@
                    Partition[
                      (tip - hr diff + #1&)/@
                        ((ap hr Norm[diff] Base3D) . {temp, 
                              Normalize[temp\[Cross]diff]}), 2, 1]]}}]] /; 
        Length[from] == Length[to] == 3Arrow[a_, Tail -> b_, opts___] := Vector[b, a + b, opts]Arrow[a_, opts___] := Vector[Table[0, {Length[a]}], a, opts]\(ArrowHead[a_, b_, opts___] := 
      Vector[a - b, a, ShaftQ -> False, opts]; 

End[]; 

    \(EndPackage[]; \)\)

Graphics`Colors`GosiaGreen = RGBColor[0,  0.392187,  0];

T.1)  Velocity and acceleration

At time t, an object is at the location 
       P[t] = {x[t], y[t]}.

\(Clear[t, x, y, P]; 
P[t_] = {x[t], y[t]}\)

The velocity of the object at time t is given by:

\(Clear[vel]; 
vel[t_] = D[P[t], \ t]\)

The velocity is a vector quantity.  When you put its tail at {x[t], y[t]}, the velocity vector 
       {x'[t],y'[t]}=P'[t]=D[P[t], t] 
is tangent to the curve traced out by the motion of P[t]. This velocity vector points in the instantaneous direction that the object is going. 
The speed of the object is the length of the velocity vector:

\(Clear[speed]; 
speed[t_] = \@\(vel[t] . vel[t]\)\)

The acceleration of the object is given by:

\(Clear[accel]; 
accel[t_] = D[vel[t], \ t]\)

T.1.a)

What does the acceleration vector measure?

Answer:

Because the velocity vector is the derivative of the position vector, the velocity vector measures the rate of change of the position.
Because the acceleration vector is the derivative of the velocity vector, the acceleration vector measures the rate of change of the velocity.

T.1.b)

At time t, an object is at the point 
       P[t] = {3  Cos[t], 3  Sin[t]}. 
Plot the motion of the object in true scale for 0 ≤ t ≤ 2  π, and include several velocity and acceleration vectors.
Discuss what the plot reveals.

Answer:

Clear[t, P]; \(P[t_] = {3\ Cos[t], 3\ Sin[t]}; 


    curveplot = 
      ParametricPlot[P[t], {t, 0, 2\ π}, 
        PlotStyle -> Thickness[0.01], AspectRatio -> Automatic, 
        AxesLabel -> {"x", "y"}]; \)

Circular motion - no big surprise.
Now set up the velocity and acceleration vectors:

Clear[vel, accel]; \(vel[t_] = D[P[t], \ t]; 

accel[t_] = D[vel[t], \ t]; 


    Clear[velvector]; 

    velvector[t_] := 
      Arrow[vel[t], Tail -> P[t], VectorColor -> Blue]; 


    Clear[accelvector]; 

    accelvector[t_] := 
      Arrow[accel[t], Tail -> P[t], VectorColor -> Red]; 


    Show[curveplot, velvector[π\/4], accelvector[π\/4], 
      AspectRatio -> Automatic]; \)

The velocity vector indicates the direction of the motion, and the acceleration vector indicates that the force on the object (force=mass times acceleration) is directed toward the origin, perpendicular to the velocity vector.
Check out some more velocity and acceleration vectors:

Show[curveplot, Table[velvector[t], {t, 1.2, 7.2,  .5}], 
      Table[accelvector[t], {t, 1.2, 7.2,  .5}], 
      AspectRatio -> Automatic];

Neato.
In this set up, the acceleration vectors at P[t] are all perpendicular to the velocity vectors at P[t]. This means the force on the object neither speeds up nor slows down the object.  To confirm this, check out the speed:

\(Clear[speed]; 
speed[t_] = \@TrigExpand[vel[t] . vel[t]]\)

The object moves with a constant speed of 3 units of length per unit of time.  Another way to see this is to look at the plot and note that all the velocity vectors have the same length.

T.1.c.i)

At time t, an object is at the point 
       P[t] = {7  Cos[t], 4  Sin[t]}. 
Plot the motion of the object in true scale for 0 ≤ t ≤ 2  π, and include several velocity and acceleration vectors.
Discuss what the plot reveals.

Answer:

\(Clear[t, P]; 
P[t_] = {7\ Cos[t], 4\ Sin[t]}; 


    curveplot = 
      ParametricPlot[P[t], {t, 0, 2\ π}, 
        PlotStyle -> Thickness[0.01], AspectRatio -> Automatic]; 
    \)

The object is moving on an ellipse.
To see which way the object is moving, look at the velocity and acceleration vectors:

Clear[vel, accel]; \(vel[t_] = D[P[t], \ t]; 

accel[t_] = D[vel[t], \ t]; 


    Clear[velvector]; 

    velvector[t_] := 
      Arrow[vel[t], Tail -> P[t], VectorColor -> Blue]; 


    Clear[accelvector]; 

    accelvector[t_] := 
      Arrow[accel[t], Tail -> P[t], VectorColor -> Red]; 


    Show[curveplot, Table[velvector[t], {t, 1.2, 7.2,  .5}], 
      Table[accelvector[t], {t, 1.2, 7.2,  .5}], 
      AspectRatio -> Automatic]; \)

The velocity vectors have different lengths, and the acceleration vectors are not perpendicular to the velocity vectors.  This signals that the speed is not constant.  Looking again, you can see that the acceleration vectors are working to speed up the object in the first and third quadrants, and the acceleration vectors are slowing the object down in the second and fourth quadrants.
Confirm with a plot of the speed:

Plot[(Sqrt[vel[t] . vel[t]]), {t, 0, 2 π}];

Going faster, then slower, then faster, and then slower.

T.1.c.ii) The tangential component of the acceleration

Folks like to call the push of the acceleration vector in the direction of the velocity vector "the tangential component of the acceleration."
Go back to the plot in part i) above and show some velocity vectors and the tangential components of the acceleration vectors.
Discuss what your plot reveals.

Remember that the push of a vector X in the direction of another vector Y is calculated by 
       X . (Y/Y) . YY.
Here come the tangential components of the acceleration vectors plotted with the velocity vectors on the curve:

\(Clear[tancompaccel, tanaccelvector]; 

    tancompaccel[t_] = \(accel[t] . vel[t]\ vel[t]\)\/vel[t] . vel[t]; 


    tanaccelvector[t_] := 
      Arrow[tancompaccel[t], Tail -> P[t], VectorColor -> Red]; 


    Show[curveplot, Table[velvector[t], {t, 1.2, 7.2,  .5}], 
      Table[tanaccelvector[t], {t, 1.2, 7.2,  .5}], 
      AspectRatio -> Automatic]; \)

When the tangential components of the acceleration vectors are pushing in the same direction as the velocity vectors, the object is gaining speed.
When the tangential components of the acceleration vectors are pushing in the direction opposite to the velocity vectors, the object is losing speed.
Look at the brakes go on as the object goes into the sharp turns, and look at how the object speeds up as it comes out of the turns.

T.1.c.iii) The normal component of the acceleration

Folks like to call the push of the acceleration vector in the direction perpendicular to the velocity vector by the name "the normal component of the acceleration."
Go back to the plot in part i) above and show some acceleration vectors split into normal and tangential components. 
Discuss what your plot reveals.

You already have the tangential components of the acceleration vectors live in part ii) above. The perpendicular component is just
     accel[t] -  tancompaccel[t]:

\(Clear[perpcompaccel, perpaccelvector]; 

    perpcompaccel[t_] = accel[t] - tancompaccel[t]; 


    perpaccelvector[t_] := 
      Arrow[perpcompaccel[t], Tail -> P[t], VectorColor -> Red]; 

    
Show[curveplot, Table[tanaccelvector[t], {t, 1.2, 7.2, 0.5}], 
      Table[perpaccelvector[t], {t, 1.2, 7.2, 0.5}], 
      AspectRatio -> Automatic]; \)

The tangential components govern the speed of the object, and the perpendicular components measure the tug on the object as it goes on its elliptical path. Note that the tug is greater in the sharp turns than it is on the flatter parts of the curve. Just as you expect.

T.2)  Using the normal vector to bounce light beams off two-dimensional curves

When you have a parametric formula P[t] = {x[t], y[t]} for a curve in two dimensions, then you can calculate a tangent vector
at P[t] by calculating 
       tan[t]={x'[t],y'[t]}. 
You can also calculate a vector perpendicular to the curve at P[t] by calculating
       normal[t] = {y'[t], -x[t]}. 
Fancy folks like to call the perpendicular vector by the name "normal vector."
Here is a sample curve shown with a selection of tangents and normals:

\(Clear[t, x, y, P]; 
x[t_] = t + Sin[2\ t]; 
\(y[t_] = 3\ Cos[t]; \)\)\(P[t_] = {x[t], y[t]}; 

a = 0; 
\(b = 5; \)\)curveplot = 
        ParametricPlot[P[t], {t, a, b}, PlotStyle -> Thickness[0.01], 
          DisplayFunction -> Identity];

Clear[tan, normal];
tan[t_]={x'[t],y'[t]};normal[t_]={y'[t],-x'[t]};

Clear[tanvector];
tanvector[t_] := 
        Arrow[tan[t], Tail -> P[t], VectorColor -> Blue];

Clear[normalvector];
normalvector[t_] := 
        Arrow[normal[t], Tail -> P[t], VectorColor -> Red];

Show[curveplot, 
        Table[{tanvector[t], normalvector[t]}, {t, a, b, ((b - a)/6)}], 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> $DisplayFunction];

The vectors overwhelm the plot. 
Tone them down by applying a scale factor to the tangent and normal vectors:

\(scalefactor = 0.6; 

Clear[tanvector]; 

    tanvector[t_] := 
      Arrow[tan[t], Tail -> P[t], VectorColor -> Blue, \ 
        ScaleFactor -> scalefactor\ ]; 

Clear[normalvector]; 

    normalvector[t_] := 
      Arrow[normal[t], Tail -> P[t], VectorColor -> Red, \ 
        ScaleFactor -> scalefactor]; 


    Show[curveplot, 
      Table[{tanvector[t], normalvector[t]}, {t, a, b, \(b - a\)\/6}], 
      AspectRatio -> Automatic, AxesLabel -> {"x", "y"}, 
      DisplayFunction -> $DisplayFunction]; \)

That's a bit better.

T.2.a)

How did you know in advance that the normal vectors
       {y'[t],-x'[t]} 
are guaranteed to be perpendicular to the tangent vectors 
       {x'[t],y'[t]}?

The perpendicularity test says:
Two vectors X and Y are perpendicular if X . Y = 0.
Taking 
       X = {x'[t], y'[t]} and Y = {y'[t], -x'[t]}, 
you don't need Mathematica to see that
       X . Y = 
        x'[t] y'[t] + y'[t] (-x'[t]) = 0.

T.2.b) How to handle curves specified in nonparametric form

Here is a curve plotted in nonparametric form:

\(Clear[f, x]; 
f[x_] = 2.5\ E\^\(-\((x - 3)\)\^2\); 

a = 0; 

    \(b = 6; \)\)curveplot = 
      Plot[f[x], {x, a, b}, PlotStyle -> Thickness[0.01], 
        AxesLabel -> {"x", "y"}];

How do you stick some tangent and normal vectors onto this curve?

Every function specified as y = f[x] can be thought of as a shorthand version of the parametric version, P[x] = {x, y} = {x, f[x]}, or, after changing the independent variable, P[t] = {t, f[t]}.  That makes this job easy:
Replot in parametric form, scale the tangent and normal vectors, and run:

\(Clear[t, x, y, P]; 
x[t_] = t; 
\(y[t_] = f[t]; \)\)P[t_] = {x[t], y[t]};

curveplot = 
        ParametricPlot[P[t], {t, a, b}, PlotStyle -> Thickness[0.01], 
          DisplayFunction -> Identity];

Clear[tan, normal];
tan[t_]={x'[t],y'[t]};

normal[t_]={y'[t],-x'[t]};

scalefactor = 0.6;
Clear[tanvector];
tanvector[t_] := 
        Arrow[scalefactor tan[t], Tail -> P[t], 
          VectorColor -> Blue, ScaleFactor -> scalefactor];

Clear[normalvector];
normalvector[t_] := 
        Arrow[scalefactor normal[t], Tail -> P[t], 
          VectorColor -> Red, ScaleFactor -> scalefactor];

Show[curveplot, 
        Table[{tanvector[t], normalvector[t]}, {t, a, b, ((b - a)/8)}], 
        AspectRatio -> Automatic, AxesLabel -> {"x", "y"}, 
        DisplayFunction -> $DisplayFunction];

There ya go.

T.2.c)

Here is the curve 
       f[x] = 1 - Cos[x] for -(π/2) ≤ x ≤ (π/2) 
 shown with a light beam emanating from {2, 3} and hitting the curve at 
       {0.5, f[0.5]}:

\(Clear[t, f, x, y, P]; 
f[x_] = 1 - Cos[x]; 
\(x[t_] = t; \)\)y[t_] = f[t]; \(P[t_] = {x[t], y[t]}; 

a = \(-\(π\/2\)\); 
\(b = π\/2; 
    \)\)\(curveplot = 
      ParametricPlot[P[t], {t, a, b}, PlotStyle -> Thickness[0.01], 
        AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; 
source = {2, 3}; 

    hit = {0.5, f[0.5]}; 

    label = Graphics[Text["source", source + {0, 0.2}]]; 

    sourceplot = Graphics[{Red, PointSize[0.05], Point[source]}]; 

    incominglight = 
      Arrow[hit - source, Tail -> source, VectorColor -> Red]; 


    Show[curveplot, incominglight, label, sourceplot, PlotRange -> All, 
      DisplayFunction -> $DisplayFunction]; \)

Plot where the light beam goes after it bounces off the curve.

The physical principle behind bouncing light is that the angle of incidence is the same as the angle of reflection.  To get an idea of how to make use of this physical principle, include the normal vector at the hit and run the vector from the hit to the source.

X = source - hit;

reverseincominglight = 
        Arrow[X, Tail -> hit, VectorColor -> Red];

\(extralabels = {
          Graphics[Text["X", hit + \(source - hit\)\/2]], 
\ \ \ \ 
          \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 		
          Graphics[Text["normal[0.5]", hit + normal[0.5]\/2]]}\);

Clear[normal, normalvector, t];
normal[t_]={y'[t],-x'[t]};

normalvector[t_] := 
        Arrow[normal[t], Tail -> hit, VectorColor -> Blue];

Show[curveplot, reverseincominglight, normalvector[0.5], extralabels, 
        sourceplot, label, PlotRange -> All, 
        DisplayFunction -> $DisplayFunction];

Agree that R is a vector specifying the direction of the reflected light and note that the angle R makes with normal[0.5] is the same as the angle X makes with normal. So you want
       X . normal[0.5] = 
        ‖X‖ 
          ‖normal[0.5]‖ 
          Cos[b]
       R . normal[0.5] = 
        ‖R‖ 
          ‖normal[0.5]‖ 
          Cos[b]
where b is the angle between X and normal[0.5].
When you make
       R . R = 
        ‖R(‖^2) = 
          ‖X(‖^2) = 
            X . X, 
you get two equations to solve for the two slots of R:

\(Clear[R, r1, r2]; 
R = {r1, r2}; 


    equation1 = R . normal[0.5] == X . normal[0.5]; 

    equation2 = R . R == X . X; 


    solutions = Solve[{equation1, equation2}]\)

One solution for R is X itself:

X

Discard it and go with:

r1 = -3.18283; r2 = 0.632514; R = {r1, r2}

Try it out:

\(outgoinglight = Arrow[R, Tail -> hit, VectorColor -> Red]; 

    
Show[sourceplot, outgoinglight, curveplot, reverseincominglight, 
      normalvector[0.5], extralabels, sourceplot, label, Axes -> True, 
      PlotRange -> All, DisplayFunction -> $DisplayFunction]; \)

Beautiful.
Here's the path of the light:

Show[curveplot, incominglight, outgoinglight, label, sourceplot, 
      Axes -> True, PlotRange -> All, 
      DisplayFunction -> $DisplayFunction];

Lookin' just fine, thank you.

T.3)  Lines

To specify a line, you need a point to run the line through and you need a vector to specify the direction of the line.

T.3.a.i) 2D lines

Come up with a parametric formula for the line that runs through {-2, -1} and runs parallel to the vector {3, 1}.
Show the line, the vector, and the point in a single plot.
Give the equation of the line in the nonparametric form 
       y = f[x].

Here comes the parametric formula:

point = {-2, -1}; \(parallelvector = {3, 1}; 

Clear[line, t]; 

    line[t_] = point + t\ parallelvector\)

A parametric formula for the line that runs through {-2, -1} and runs parallel to the vector {3, 1} is 
       {x[t], y[t]} = {-2, -1} +  t {3, 1}.
Note how the parametric formula displays the given point and the parallel vector.
Here comes the plot:

\(directionvector = 
      Arrow[parallelvector, Tail -> point, VectorColor -> Red]; 


    pointplot = Graphics[{PointSize[0.04], Red, Point[point]}]; 


    lineplot = 
      ParametricPlot[line[t], {t, \(-2\), 3}, 
        PlotStyle -> Thickness[0.01], AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; 


    Show[lineplot, pointplot, directionvector, 
      DisplayFunction -> $DisplayFunction]; \)

Here's how the plot looks when you stick the tail of the parallel vector at {0, 1}:

\(directionvector = 
      Arrow[parallelvector, Tail -> {0, 1}, VectorColor -> Red]; 

    
Show[lineplot, directionvector, 
      DisplayFunction -> $DisplayFunction]; \)

Parallel.
To come up with the formula of the line in the nonparametric form y = f[x], look at:

\(Clear[x, y]; 
equation = {x, y} == line[t]\)

Eliminate t by writing 
       t=((x  +  2)/3) and t = y +  1 
and setting
       ((x  +  2)/3)==y +  1:

squasht = Eliminate[equation, t]

Now solve for y:

Solve[squasht, y]

The nonparametric formula of this line is 
       y=((x  -  1)/3).

T.3.a.ii) 3D lines

Come up with a parametric formula for the line that runs through {2, -3, -5} and runs parallel to the vector {-1.5, 2.5, 3.3}.
Show the line, the vector, and the point in a single plot.

You do it the same way you handle the 2D case.
Here comes the parametric formula:

point = {2, -3, -5}; parallelvector = {-1.5, 2.5, 3.3}; \(Clear[line, t]; 
line[t_] = point + t\ parallelvector\)

A parametric formula for the line that runs through 
       {2, -3, -5} 
and runs parallel to the vector 
       {-1.5, 2.5, 3.3} 
is
       ({x[t], y[t], z[t]} = {2, -3, -5} +  
            t {-1.5, 2.5, 3.3})
Note how the parametric formula conveniently displays the given point and the parallel vector.
Here comes the plot:

\(directionvector = 
      Arrow[parallelvector, Tail -> point, VectorColor -> Red]; 


    pointplot = Graphics3D[{PointSize[0.04], Red, Point[point]}]; 

    lineplot = 
      ParametricPlot3D[line[t], {t, \(-2\), 3}, 
        DisplayFunction -> Identity]; 
threedims = Axes3D[3,  .2]; 


    Show[threedims, lineplot, pointplot, directionvector, 
      ViewPoint -> CMView, Boxed -> False, 
      DisplayFunction -> $DisplayFunction]; \)

Here's how the plot looks when you stick the tail of the parallel vector at {0, 0, 0}:

\(directionvector = 
      Arrow[parallelvector, Tail -> {0, 0, 0}, VectorColor -> Red]; 
    

Show[threedims, lineplot, directionvector, ViewPoint -> CMView, 
      Boxed -> False, DisplayFunction -> $DisplayFunction]; \)

T.3.b.i) 2D lines

Here's a look at the two points {-2, 3} and {3, 0} in two dimensions:

point1 = {-2, 3}; point2 = {3, 0}; \(pointplot = 
      Graphics[{{PointSize[0.04], Red, Point[point1]}, {PointSize[0.04], Red, 
            Point[point2]}}]; 


    Show[pointplot, Axes -> True, AxesLabel -> {"x", "y"}]; \)

Come up with a parametric formula for the line that runs through these two points
Show the line and the two points in a single plot.

This line is parallel to the vector that runs from {-2, 3} to {3, 0}, which is given by 
       {3, 0 - {-2, 3} = {5, -3}.

parallelvector = point2 - point1

Take a look:

Show[pointplot, 
      Arrow[parallelvector, Tail -> point1, VectorColor -> Red], 
      Axes -> True, AxesLabel -> {"x", "y"}];

Here's a parametric formula:

\(Clear[line, t]; 
line[t_] = point1 + t\ parallelvector\)

You can see one of the points – namely, {-2, 3} – prominently displayed in this parametric formula. Here comes the plot:

\(lineplot = 
      ParametricPlot[line[t], {t, \(-1\), 2}, 
        PlotStyle -> Thickness[0.01], AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; 


    Show[lineplot, pointplot, DisplayFunction -> $DisplayFunction]; \)

There you go.

T.3.b.ii) 3D lines

Here's a look at three points in three dimensions:

point1 = {-1.51, 2.32, -1.81}; point2 = {2.69, -1.14, 4.43}; point3 = {0.59, 0.59, 1.31}; \(pointplot = {Graphics3D[{PointSize[0.04], Red, Point[point1]}], 
        Graphics3D[{PointSize[0.04], Red, Point[point2]}], 
        Graphics3D[{PointSize[0.04], Red, Point[point3]}]}; 

    threedims = Axes3D[1,  .3]; 


    Show[threedims, pointplot, ViewPoint -> CMView, 
      PlotRange -> All, Boxed -> False]; \)

These three points certainly look like they're lined up in a straight line. 
How can you tell for sure?

Put a line between two of them and see whether the third point is on this line:

\(Clear[line, t]; 
line[t_] = point1 + t\ \((point2 - point1)\); 

    distance[t_]\  = \ \@\(\((line[t] - point3)\) . \((line[t] - point3)\)\); 
    

Solve[distance[t] == 0, t]\)

Compare:

point3

line[0.5]

Yep, the line goes through all three points.
Another way of seeing this is to make a vector running from point1 to point2 and another vector running from point1 to point3:

vector12 = point2 - point1

vector13 = point3 - point1

vector12PushAlongvector13  =  
      vector12 . (vector13/vector13) . vector13 vector13

vector12  ==  vector12PushAlongvector13

This tells you that the push of vector12 in the direction of vector13 is the same as vector12.
This is enough to confirm that the three points all reside on a single line.

T.3.c)  Midpoints

Look at:

X = {2, 10}; Y = {11, 3}; setup = 
      Show[Arrow[X, Tail -> {0, 0}, VectorColor -> Red], 
        Graphics[Text["X", (X/2)]], 
        Arrow[Y, Tail -> {0, 0}, VectorColor -> Red], 
        Graphics[Text["Y", (Y/2)]], Axes -> True, 
        AxesLabel -> {"x", "y"}];

Use vectors to find the midpoint of the line segment that runs from the tip of X to the tip of Y.

Answer:

Remember that if you hook the tail of X -  Y to the tip of Y, then X -  Y runs from the tip of Y to the tip of X. Why?
Because
       X = Y +  (X -  Y).

Show[setup, Arrow[X - Y, Tail -> Y, VectorColor -> Red], 
      Graphics[Text["X-Y", Y + ((X - Y)/2)]]];

To get to the midpoint of the line segment connecting the tip of Y and the tip of X, you can travel on Y to the tip of Y, and then travel along X -  Y, but you should only go halfway.  This means:

midpoint = Y + ((X - Y)/2)

Check with a plot:

midpointplot = Graphics[{Blue, PointSize[0.04], Point[midpoint]}]; 
    \(lineplot = Graphics[Line[{X, Y}]]; 


    Show[setup, lineplot, midpointplot]; \)

Copacetic.

T.4)  Pursuits

T.4.a.i)

Bubba is really enjoying one of those big time keg parties out in the woods. Having learned to monitor his blood alcohol level in earlier Calculus&Mathematica lessons, Bubba took his bicycle to the party instead of driving his car.  At time t = 0, Bubba leaves the party and gets on his bicycle to ride home. 
At time t, after leaving the party, Bubba is at the point 
       {2 t + (1/2) Sin[4 t], t +  (E^(-t)) Sin[3 t]}.  
Here is his route:

\(Clear[bubba, t]; 

    bubba[t_] = {2\ t + 1\/2\ Sin[4\ t], t + E\^\(-t\)\ Sin[3\ t]}; 

    bubbaroute = 
      ParametricPlot[bubba[t], {t, 0, 5}, 
        PlotStyle -> {{Thickness[0.01], Red}}, 
        AxesLabel -> {"x", "y"}, 
        DisplayFunction -> Identity]; 


    pointplot = {Graphics[{PointSize[0.06], Point[bubba[0]]}], 
        Graphics[{PointSize[0.06], Point[bubba[5]]}]}; 


    labels = {Graphics[Text["Party", bubba[0], {\(-2\), 0}]], 
        Graphics[Text["Home", bubba[5], {0, 5}]]}; 


    Show[bubbaroute, pointplot, labels, AspectRatio -> Automatic, 
      PlotRange -> All, DisplayFunction -> $DisplayFunction]; \)

Slightly unsteady is your friend Bubba.
While Bubba was at the party, his Blue Tick hound dog was sleeping at the point {0, 2}.  As Bubba left the party, the dog wakes up and chases Bubba. Here is the dog's scheme:
If the dog is at 
       {x[t], y[t]} 
at time t, then he leaves {x[t], y[t]} with instantaneous velocity
       bubba[t] - {x[t], y[t]}. 
This means that at any time t, the dog is always running toward the point bubba[t], Bubba's current position. 
Does the dog catch up with Bubba before Bubba gets home and locks the dog out?

You guessed it.
This is a job for a system of differential equations.
Put:

\(Clear[dogvelocity, x, y, t]; 

    dogvelocity[t_] = bubba[t] - {x[t], y[t]}\)

The system of differential equations is:

Clear[Derivative];
equationx=x'[t]==dogvelocity[t][[1
            ]]

equationy=y'[t]==dogvelocity[t][[2
          ]]

starterx = x[0] == 0

startery = y[0] == 2

Here comes the approximate plot of the dog's route for 
       0 ≤ t ≤ 5:

endtime = 5; \(Clear[x, y, t, Derivative]; 

    approxsolutions = 
      NDSolve[{equationx, equationy, starterx, startery}, {x[t], y[t]}, {t, 
          0, endtime}]; 

Clear[fakex, fakey]; 

    fakex[t_] = 
      x[t] /. approxsolutions[[1]]; 

    fakey[t_] = 
      y[t] /. approxsolutions[[1]]; 


    dogplot = 
      ParametricPlot[{fakex[t], fakey[t]}, {t, 0, endtime}, 
        PlotStyle -> {{Blue, Thickness[0.02]}}, 
        DisplayFunction -> Identity]; 


    outcome = 
      Show[dogplot, bubbaroute, pointplot, labels, 
        AspectRatio -> Automatic, PlotRange -> All, 
        DisplayFunction -> $DisplayFunction]; \)

The dog didn't make it.
Hope it doesn't rain.

T.4.a.ii)

Illustrate the dog's strategy by making a movie reviewing the chase.

Set up the movie code and look at one frame:

Clear[bubbapoint, bubbavelocityvector, dogpoint, dogvelocityvector, 
        situation, t];
bubbapoint[t_] := 
        Graphics[{{Red, PointSize[0.04], Point[bubba[t]]}, 
            Text["Bubba", bubba[t] + {0, 0.3}]}];

dogpoint[t_] := 
        Graphics[{{Blue, PointSize[0.04], Point[{fakex[t], fakey[t]}]}, 
            Text["dog", {fakex[t], fakey[t]} - {0, 0.3}]}];

dogvelocityvector[t_]:=Arrow[{fakex'[t],fakey'[t]},Tail -> {fakex[t], fakey[t]},VectorColor -> Blue];

situation[t_] := 
        Show[pointplot, labels, bubbapoint[t], dogpoint[t], 
          dogvelocityvector[t], AspectRatio -> Automatic, 
          PlotRange -> All, DisplayFunction -> Identity];

Show[situation[2], DisplayFunction -> $DisplayFunction];

See the chase:

Table[Show[situation[t], DisplayFunction -> $DisplayFunction]; 
      , {t, 0.2, 4.8, (4.6/6)}];

The dog almost catches up with Bubba early in the chase.
Bubba is going so fast when he gets to his home that you've got to be nervous about whether or not he crashes right through the front door.

T.4.a.iii)

What should the dog have done to catch Bubba?

Common sense says that the dog should have run faster. 
Here's what could have happened if the dog had run five times faster than he did above:

Clear[newdogvelocity, x, y, t];
newdogvelocity[t_] = 5 dogvelocity[t];
Clear[Derivative];
equationx=x'[t]==newdogvelocity[t][[1
            ]];
equationy=y'[t]==newdogvelocity[t][[2
              ]];starterx = x[0] == 0; startery = y[0] == 2; endtime = 5; \(Clear[x, y, t, Derivative]; 

    approxsolutions = 
      NDSolve[{equationx, equationy, starterx, startery}, {x[t], y[t]}, {t, 
          0, endtime}]; 
Clear[fakex, fakey]; 

    fakex[t_] = 
      x[t] /. approxsolutions[[1]]; 

    \(fakey[t_] = 
      y[t] /. approxsolutions[[1]]; 
    \)\)dogplot = 
      ParametricPlot[{fakex[t], fakey[t]}, {t, 0, endtime}, 
        PlotStyle -> {{Blue, Thickness[0.02]}}, 
        DisplayFunction -> Identity]; outcome = 
      Show[bubbaroute, dogplot, pointplot, labels, 
        AspectRatio -> Automatic, PlotRange -> All, 
        DisplayFunction -> $DisplayFunction];

The smart money bets that the dog trotted through the door only seconds after Bubba opened the door. In fact, the dog was running only slightly behind Bubba for most of the chase. 
Take a look:

Clear[dogpoint, dogvelocityvector, situation, t];
dogpoint[t_] := 
        Graphics[{{Blue, PointSize[0.04], Point[{fakex[t], fakey[t]}]}, 
            Text["dog", {fakex[t], fakey[t]} - {0, 0.3}]}];

dogvelocityvector[t_]:=Arrow[{fakex'[t],fakey'[t]},Tail -> {fakex[t], fakey[t]},VectorColor -> Blue];

situation[t_] := 
        Show[pointplot, labels, bubbapoint[t], dogpoint[t], 
          dogvelocityvector[t], AspectRatio -> Automatic, 
          PlotRange -> All, DisplayFunction -> Identity];

Table[Show[situation[t], DisplayFunction -> $DisplayFunction]; 
        , {t, 0.2, 4.8, (4.6/6)}];

The dog is no fool; the dog knows that it's safer to run behind Bubba than to run in front of him.

T.5)  Spying along the tangent

At time t, you are at the point P[t] specified through the polar parameterization:

\(Clear[P, x, y, r, t]; 

    r[t_] = 3.12 - 0.65\ Cos[t] + 0.32\ Cos[2\ t] - 0.83\ Cos[3\ t] + 
        1.92\ Sin[t] - 2.68\ Sin[2\ t] + 1.79\ Sin[3\ t]; 


    P[t_] = \(r[t]\ \) {Cos[t], Sin[t]}\)

Take a look:

path = 
      ParametricPlot[P[t], {t, 0, 2 π}, 
        PlotStyle -> {{Thickness[0.01], Blue}}, 
        AxesLabel -> {"x", "y"}];

Add your line of sight to the plot when you look forward in the instantaneous direction you are going when t = 0.8.
Then describe, in terms of a clean formula, all the points you can see at the instant t = 0.8.

You are looking in the direction of the tangent vector P'[0.8] with its tail at P[0.8]:

point = Graphics[{Red, PointSize[0.03], Point[P[0.8]]}]; Show[path,point,Arrow[P'[0.8],Tail -> P[0.8],VectorColor -> Red]];

The points you can see are descibed by the clean formula

Clear[lineofsight, s];
lineofsight[s_]=N[P[0.8]+s P'[0.8]]

where you take s ≥ 0 because you are looking forward along the tangent vector. Here's part of your line of sight:

sightplot = 
        ParametricPlot[lineofsight[s], {s, 0, 5}, 
          DisplayFunction -> Identity];

Show[path,point,sightplot,Arrow[P'[0.8],Tail -> P[0.8],VectorColor -> Red],DisplayFunction -> $DisplayFunction];

Without the tangent vector:

Show[path, point, sightplot, 
      DisplayFunction -> $DisplayFunction];

If you had eyes in the very back of your head, you would also be able to see points on this line:

\(bothways = 
      ParametricPlot[lineofsight[s], {s, \(-5\), 5}, 
        DisplayFunction -> Identity]; 


    Show[path, point, bothways, DisplayFunction -> $DisplayFunction]; 
    \)

The line you see is what lots of the good old folks like to call a tangent line at P[0.8].