Function Repository Resource:

TurningNumber

Source Notebook

Compute the turning number of a curve

Contributed by: Wolfram Staff (original content by Alfred Gray)

ResourceFunction["TurningNumber"][c,{t,a,b}]

computes the turning number of a curve c with parameter t running from a to b.

Details and Options

ResourceFunction["TurningNumber"] is similar to winding number, but in this case the number of rotations is counted with respect to the tangent vector of the curve instead of a fixed point.

Examples

Basic Examples (1) 

The turning number changes its sign depending on whether the tangent vector moves clockwise or counterclockwise:

In[1]:=
ResourceFunction["TurningNumber"][{Cos[t], Sin[t]}, {t, 0, 2 \[Pi]}]
Out[1]=
In[2]:=
ResourceFunction["TurningNumber"][{Sin[t], Cos[t]}, {t, 0, 2 \[Pi]}]
Out[2]=

Scope (2) 

Define a limaçon:

In[3]:=
limacon = Entity["PlaneCurve", "Limacon"][
  EntityProperty["PlaneCurve", "ParametricEquations"]]
Out[3]=

Here is a function for computing tangent vectors:

In[4]:=
TangentVector[{f_, g_}, t_] := Module[{df = \!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]f\), dg = \!\(
\*SubscriptBox[\(\[PartialD]\), \(t\)]g\)}, {df, dg}/Sqrt[df^2 + dg^2]
  ]

Interactively plot the limaçon while tracking a tangent vector and its turning number. This shows that the turning number of a limaçon is 2:

In[5]:=
Manipulate[
 Show[ParametricPlot[limacon[3, 1][t], {t, 0, tf}, PlotRange -> {{-3, 5}, {-3, 3}}], Graphics[
   Arrow[{limacon[3, 1][tf], limacon[3, 1][tf] + TangentVector[limacon[3, 1][t], t]}] /. t -> tf], PlotLabel -> ResourceFunction["TurningNumber"][
    limacon[3, 1][t], {t, 0, tf}]], {{tf, \[Pi]}, .1, 2 \[Pi]}]
Out[5]=

Define an eight curve:

In[6]:=
eight[t_] := {Sin[t], Cos[t] Sin[t]}

The turning number of an eight curve is first -1, then 1, giving a total of 0:

In[7]:=
Manipulate[
 Show[ParametricPlot[eight[t], {t, 0, tf}, PlotRange -> {{-1.1, 1.1}, {-1, 1}}], Graphics[
   Arrow[{eight[tf], eight[tf] + .25 TangentVector[eight[t], t]}] /. t -> tf], PlotLabel -> ResourceFunction["TurningNumber"][
    eight[t], {t, 0, tf}]], {{tf, \[Pi]}, .1, 2 \[Pi]}]
Out[7]=

Publisher

Enrique Zeleny

Version History

  • 1.0.0 – 21 February 2020

Source Metadata

Related Resources

License Information