Skip to main content
added 20 characters in body
Source Link

I'm trying to compare the unit normal definition in calculus texts (i.e., $\vec N=\vec T'/||\vec T'||$$\vec N=\vec T'/\|\vec T'\|$) where $\vec T$ is the unit tangent vector, with the unit normal vector returned by the FrenetSerretSystemFrenetSerretSystem. Using the calculus definition, this works:

But trying the FrenetSerretSystemFrenetSerretSystem, this doesn't.

Coordinate {0.01 - Cos[$CellContext`x] (1 + Cos[$CellContextx]^2)^Rational[-1, 2], 0.009999833334166664 + (1 + Cos[$CellContextx]^2)^Rational[-1, 2]} should be a pair of numbers, or a Scaled or Offset form.

Coordinate {0.01 - Cos[$CellContext`x] (1 + 
Cos[$CellContext`x]^2)^Rational[-1, 2], 0.009999833334166664 +
(1 + Cos[$CellContext`x]^2)^Rational[-1, 2]} should be a pair of numbers,
or a Scaled or Offset form.

Once I get this repaired, I am going to see the unit normal vector (calculus definition) pointing in the opposite direction of the unit normal vector (FrenetSerretSystemFrenetSerretSystem) from 0 to $\pi$ and I am wondering why. I think it might have something to do with the fact that the calculus books tend to use the curvature, whereas the FrenetSerretSystemFrenetSerretSystem uses the signed curvature, but I am still trying to figure out the different directions of the unit normal.

I'm trying to compare the unit normal definition in calculus texts (i.e., $\vec N=\vec T'/||\vec T'||$) where $\vec T$ is the unit tangent vector, with the unit normal vector returned by the FrenetSerretSystem. Using the calculus definition, this works:

But trying the FrenetSerretSystem, this doesn't.

Coordinate {0.01 - Cos[$CellContext`x] (1 + Cos[$CellContextx]^2)^Rational[-1, 2], 0.009999833334166664 + (1 + Cos[$CellContextx]^2)^Rational[-1, 2]} should be a pair of numbers, or a Scaled or Offset form.

Once I get this repaired, I am going to see the unit normal vector (calculus definition) pointing in the opposite direction of the unit normal vector (FrenetSerretSystem) from 0 to $\pi$ and I am wondering why. I think it might have something to do with the fact that the calculus books tend to use the curvature, whereas the FrenetSerretSystem uses the signed curvature, but I am still trying to figure out the different directions of the unit normal.

I'm trying to compare the unit normal definition in calculus texts (i.e., $\vec N=\vec T'/\|\vec T'\|$) where $\vec T$ is the unit tangent vector, with the unit normal vector returned by FrenetSerretSystem. Using the calculus definition, this works:

But trying FrenetSerretSystem, this doesn't.

Coordinate {0.01 - Cos[$CellContext`x] (1 + 
Cos[$CellContext`x]^2)^Rational[-1, 2], 0.009999833334166664 +
(1 + Cos[$CellContext`x]^2)^Rational[-1, 2]} should be a pair of numbers,
or a Scaled or Offset form.

Once I get this repaired, I am going to see the unit normal vector (calculus definition) pointing in the opposite direction of the unit normal vector (FrenetSerretSystem) from 0 to $\pi$ and I am wondering why. I think it might have something to do with the fact that the calculus books tend to use the curvature, whereas the FrenetSerretSystem uses the signed curvature, but I am still trying to figure out the different directions of the unit normal.

edited tags
Link
Tweeted twitter.com/StackMma/status/650623953384435712
added 1197 characters in body
Source Link
David
  • 15k
  • 4
  • 47
  • 121

Update due to m_goldberg help:

This works:

Manipulate[
 
 Module[{r, k, unitT, unitN},
  
  r[x_] = {x, Sin[x]};
  {{k[x_]}, {unitT[x_], unitN[x_]}} = FrenetSerretSystem[r[x], x];
  
  ParametricPlot[r[x], {x, 0, 2 Pi},
   Epilog -> { 
     Orange, Thick, Arrow[{r[tt], r[tt] + unitN[tt]}],
     Red, Thick, Arrow[{r[tt], r[tt] + unitT[tt]}],
     Red, PointSize[Large], Point[r[tt]]
     }, PlotRange -> {{0, 2 Pi}, {-4, 4}}]
  
  ],
 
 {tt, 0.01, 2 Pi - 0.01}]

And this works:

DynamicModule[{r, unitT, unitN, k},
 
 r[x_] = {x, Sin[x]};
 {{k[x_]}, {unitT[x_], unitN[x_]}} = FrenetSerretSystem[r[x], x];
 
 Manipulate[ParametricPlot[r[x], {x, 0, 2 Pi},
   Epilog -> {
     Orange, Thick, Arrow[{r[tt], r[tt] + unitN[tt]}],
     Red, Thick, Arrow[{r[tt], r[tt] + unitT[tt]}],
     Red, PointSize[Large], Point[r[tt]]}, 
   PlotRange -> {{0, 2 Pi}, {-4, 4}}], {tt, 0.01, 2 Pi - 0.01}]]

Both protect the functions in the modules from being changed when functions with the same name are entered in the same notebook in the global workspace.

Update due to m_goldberg help:

This works:

Manipulate[
 
 Module[{r, k, unitT, unitN},
  
  r[x_] = {x, Sin[x]};
  {{k[x_]}, {unitT[x_], unitN[x_]}} = FrenetSerretSystem[r[x], x];
  
  ParametricPlot[r[x], {x, 0, 2 Pi},
   Epilog -> { 
     Orange, Thick, Arrow[{r[tt], r[tt] + unitN[tt]}],
     Red, Thick, Arrow[{r[tt], r[tt] + unitT[tt]}],
     Red, PointSize[Large], Point[r[tt]]
     }, PlotRange -> {{0, 2 Pi}, {-4, 4}}]
  
  ],
 
 {tt, 0.01, 2 Pi - 0.01}]

And this works:

DynamicModule[{r, unitT, unitN, k},
 
 r[x_] = {x, Sin[x]};
 {{k[x_]}, {unitT[x_], unitN[x_]}} = FrenetSerretSystem[r[x], x];
 
 Manipulate[ParametricPlot[r[x], {x, 0, 2 Pi},
   Epilog -> {
     Orange, Thick, Arrow[{r[tt], r[tt] + unitN[tt]}],
     Red, Thick, Arrow[{r[tt], r[tt] + unitT[tt]}],
     Red, PointSize[Large], Point[r[tt]]}, 
   PlotRange -> {{0, 2 Pi}, {-4, 4}}], {tt, 0.01, 2 Pi - 0.01}]]

Both protect the functions in the modules from being changed when functions with the same name are entered in the same notebook in the global workspace.

deleted 1 character in body
Source Link
David
  • 15k
  • 4
  • 47
  • 121
Loading
Source Link
David
  • 15k
  • 4
  • 47
  • 121
Loading