Curves

Math 344, Carleton College, Fall 2020, Joshua R. Davis, revised 2020 September 21

In each section of this notebook, there is a demonstration followed by a problem for you to solve using Mathematica. Do them all, asking questions as you like.

Arc length

Here’s a little example of computing the arc length of a parametrized curve. After executing the code cell, read each line of code to understand what it does.

Clear[t]
gamma = {Cos[t], Sin[t], t}
ParametricPlot3D[gamma, {t, 0, 4 Pi}]
v = D[gamma, t]
speed = Sqrt[v.v]
s = Integrate[speed, {t, 0, 4 Pi}]

Here’s another example. What goes wrong? How do you fix it? (Hint: See our introductory Mathematica tutorial.)

Clear[t]
gamma = {Log[t^2 + 2], Cosh[Sin[t]], ArcTan[t]}
ParametricPlot3D[gamma, {t, 0, 1}]
v = D[gamma, t]
speed = Sqrt[v.v]
s = Integrate[speed, {t, 0, 1}]

Curvature

Here we graph the curvature of the cubic curve y = (x^3). Read each line, to understand what it’s doing.

Clear[t]
gamma = {t, t^3}
ParametricPlot[gamma, {t, -2, 2}]
v = D[gamma, t]
a = D[v, t]
aPar = (a.v / v.v) v
aPerp = a - aPar
kappa = Sqrt[aPerp.aPerp] / v.v
Plot[kappa, {t, -2, 2}]

Your task is: Copy the code block above and paste it below. Edit the first three lines of the code block, so that it graphs the twisted cubic (defined in lecture) and its curvature.

Frenet frame in R^3

This section deals with the Frenet frame of a curve in (R^3): the unit tangent vector t, unit normal vector n, and unit binormal vector b. (If you haven’t seen b yet, it’s simply the cross product t x n.) I’ve written a little bit of Mathematica code to compute this frame numerically, for any curve gamma at any chosen time (Subscript[t, 0]). You are not expected to be able to write code like this, but you should read it and try to guess what each line does.

Clear[frame, t]
frame[gamma_, t0_] :=
Module[{v, tangent, normal, binormal},
v = D[gamma, t];
tangent = Simplify[v / Norm[v], Element[t, Reals]];normal = D[tangent, t] / Norm[D[tangent, t]];tangent = N[tangent /. {t -> t0}];normal = N[normal /. {t -> t0}];binormal = Cross[tangent, normal];{tangent, normal, binormal}];

Now let’s revisit an old example of a helix winding around a torus. We saw this curve in class a few days ago.

Clear[t]
k = 10
gamma = {(2 + Cos[k t]) Cos[t], (2 + Cos[k t]) Sin[t], Sin[k t]}
ParametricPlot3D[gamma, {t, 0, 2 Pi}]
frame[gamma, 0.37]

Here is an interactive animation of the Frenet frame moving along that curve. Depending on how fast your computer is, you might have to move the slider slowly, to get a smooth response.

Manipulate[
Show[
ParametricPlot3D[gamma, {t, 0, 2 Pi}],
ParametricPlot3D[{(gamma /. {t -> t0}), (gamma /. {t -> t0}), (gamma /. {t -> t0})} + u frame[gamma, t0], {u, 0, 1}, PlotStyle->Thick]], 
{t0, 0, 2 Pi}]

By copying, pasting, and editing, construct a similar example for the twisted cubic for t in [-2, 2]. View the curve from multiple directions, to understand how it is shaped. Watch the Frenet frame move along the curve.

Osculating plane and circle

Here is some code for plotting the tangent circle to a curve at a point. If you haven’t learned about the osculating circle, then you will soon. Keep in mind that the osculating circle is not this tangent circle, but it is parallel to it and of the same radius. And the osculating plane contains the osculating circle.

Clear[curvature, circlePlot, t]
curvature[gamma_, t0_] :=
Module[{v, a, aPar, aPerp, kappa},
v = D[gamma, t];
a = D[v, t];
aPar = (a.v / v.v) v;
aPerp = a - aPar;
kappa = Sqrt[aPerp.aPerp] / v.v;
kappa];
circlePlot[gamma_, t0_, t1_, t2_, b_] := 
Module[{tan, nor, bin, kappa, center}, 
{tan, nor, bin} = frame[gamma, t0];
kappa = curvature[gamma, t0] /. {t -> t0};
center = (gamma /. {t -> t0}) + nor / kappa;
Show[
ParametricPlot3D[gamma, {t, t1, t2}, PlotRange->{{-b,b},{-b,b},{-b,b}}],
ParametricPlot3D[center + tan Cos[u] / kappa + nor Sin[u] / kappa, {u, 0, 2 Pi}, PlotStyle->Orange]]];

Here’s an example with the twisted cubic. Let me clarify what the numbers below are signalling. The “-2” and “2” indicate that we want to plot the curve for values of t in [-2, 2]. The “20” is the size of the big 3D box around the picture.

gamma= {t, t^2, t^3}
Manipulate[circlePlot[gamma, t0, -2, 2, 20], {t0, -2, 2}]

Your job is to choose a plane curve --- that is, a curve of the form gamma(t) = (x(t), y(t), 0) --- and create the corresponding manipulable circle plot.

Torsion in R^3

Here’s some code to compute “everything” about a given curve --- the Frenet frame, the curvature, and the torsion --- algebraically in terms of t. The calculations can get pretty gigantic, so you might want to stick to simple examples.

Clear[everything, t]
everything[gamma_] :=
Module[{v, tangent, normal, binormal, a, aPar, aPerp, kappa, tau},
v = D[gamma, t];
tangent = Simplify[v / Norm[v], Element[t, Reals]];normal = Simplify[D[tangent, t] / Norm[D[tangent, t]], Element[t, Reals]];binormal = Simplify[Cross[tangent, normal], Element[t, Reals]];
a = D[v, t];
aPar = Simplify[(a.v / v.v) v, Element[t, Reals]];
aPerp = a - aPar;
kappa = Simplify[Sqrt[aPerp.aPerp] / v.v, Element[t, Reals]];
tau = Simplify[-D[binormal, t].normal / Norm[v], Element[t, Reals]];
{tangent, normal, binormal, kappa, tau}];

The unit circle parametrized with unit speed is easy.

gamma = {Cos[t], Sin[t], 0}
everything[gamma]

This helix is not much harder.

gamma = {Cos[t], Sin[t], t}
everything[gamma]

Here’s a problem for you: Compute everything about the twisted cubic. Then figure out where the torsion is maximized.