Mathematical Modeling & Mathematica

Lab 6:  Graphing in 3-Space

An Animation of Tangent and Normal
 Vectors along the Twisted Cubic

John E. Cruthirds and L. Richard Hitt
Department of Mathematics and Statistics
University of South Alabama

Introduction

This notebook contains an animation of the unit tangent and unit normal vectors moving along the twisted cubic curve.  The actual frames of the animation are contained in the next section.  The last section shows how the frames were generated by Mathematica .

The Animation

Implementation

The following Mathematica  code was used to generate the frames of the animation in the previous section.

r[t_] := {(t^2), t, (t^3)}mag[g_] := 
      (Sqrt[g[[1]]^2 + 
          g[[2]]^2 + 
          g[[3]]^2])tangent[g_] := (∂_t) (g/mag)[(∂_t) g]normal[g_] := 
      (∂_t) tangent[g]/mag[(∂_t) tangent[g]]Tngnt[s_] := tangent[r[t]] /. t -> sNrml[s_] := normal[r[t]] /. t -> sg = 
      ParametricPlot3D[{(t^2), t, (t^3)}, {t, -1.5, 1.5}, 
        DisplayFunction -> Identity]; lines[s_] := 
      Graphics3D[{RGBColor[1, 0, 0], Thickness[.015], 
          Line[{r[s], r[s] + Tngnt[s]}], Line[{r[s], r[s] + Nrml[s]}]}]Do[Show[g, lines[s], DisplayFunction -> $DisplayFunction, 
        BoxRatios -> {2.7, 3.2, 8.1}, 
        PlotRange 
          -> {{-1, 2.7}, {-1.5, 1.7}, {-3.8, 4.3}}], {s, 
        -1.5, 1.5, .1}]