Function Repository Resource:

TangentVector

Source Notebook

Compute the tangent vector of a curve

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

ResourceFunction["TangentVector"][c,t]

computes the tangent vector of a curve c parametrized by t.

Details and Options

The tangent vector is a unit vector tangent to a curve or surface at a given point.

Examples

Basic Examples (1) 

Calculate the value of the tangent vector of a curve:

In[1]:=
ResourceFunction["TangentVector"][{Cos[t], Sin[t] Cos[t]}, t] /. t -> 1.
Out[1]=

Scope (2) 

Plot a set of tangent vectors:

In[2]:=
ParametricPlot[{Cos[t], Sin[t] Cos[t]}, {t, 0, 2 \[Pi]}, Epilog -> Table[Arrow[{{Cos[tf], Sin[tf] Cos[
        tf]}, ({Cos[t], Sin[t] Cos[t]} + .3 ResourceFunction[
          "TangentVector"][{Cos[t], Sin[t] Cos[t]}, t] /. t -> tf)}], {tf, 0, 2 \[Pi], 2 \[Pi]/50}]]
Out[2]=

The tangent vector of a figure-eight curve:

In[3]:=
Manipulate[
 ParametricPlot[{Cos[t], Sin[t] Cos[t]}, {t, 0, 2 \[Pi]}, Epilog -> Arrow[{{Cos[tf], Sin[tf] Cos[
        tf]}, ({Cos[t], Sin[t] Cos[t]} + .3 ResourceFunction[
          "TangentVector"][{Cos[t], Sin[t] Cos[t]}, t] /. t -> tf)}]], {tf, .1, 2 \[Pi]}]
Out[3]=

Properties and Relations (2) 

Define a helix:

In[4]:=
helix = Entity["SpaceCurve", "Helix"]["ParametricEquations"][1, 2][t]
Out[4]=

The tangent developable surface of a curve is generated by the tangent vector field of the curve. It can be calculated using the resource function TangentDevelopableSurface:

In[5]:=
tdhelix = ResourceFunction[
ResourceObject[<|{"Name" -> "TangentDevelopableSurface", "ShortName" -> "TangentDevelopableSurface", "UUID" -> "75f19aab-19bd-4c6d-a49a-831d24f05b36", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Compute the tangent developable surface of a curve", "RepositoryLocation" -> URL[
        "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], "SymbolName" -> "FunctionRepository`$560de8ae55d84c42a89801e00e6b9bb2`TangentDevelopableSurface", "FunctionLocation" -> CloudObject[
        "https://www.wolframcloud.com/obj/0c491bca-093e-420d-b517-b9bf0d78c1ca"]}|>, {ResourceSystemBase -> Automatic}]][helix, t, {u, v}] // Simplify
Out[5]=

This is alternatively formed by adding a multiple of the tangent vector to the curve:

In[6]:=
helix + v*ResourceFunction["TangentVector"][helix, t] /. t -> u
Out[6]=

Plot the surface:

In[7]:=
ParametricPlot3D[Evaluate[tdhelix], {u, 0, 12}, {v, 0, 2 \[Pi]}, PlotPoints -> {40, 15}]
Out[7]=

A unit speed helix:

In[8]:=
uhelix = {a Cos[t/Sqrt[a^2 + b^2]], a Sin[t/Sqrt[a^2 + b^2]], (b t)/
   Sqrt[a^2 + b^2]};

The curvature, via the resource function Curvature:

In[9]:=
\[Kappa] = Simplify[ResourceFunction["Curvature"][uhelix, t], a > 0 && b > 0 && t > 0]
Out[9]=

The tangent vector:

In[10]:=
tan = Simplify[ResourceFunction["TangentVector"][uhelix, t], a > 0 && b > 0 && t > 0]
Out[10]=

The derivative of the tangent vector:

In[11]:=
D[tan, t]
Out[11]=

The normal vector, via the resource function NormalVector:

In[12]:=
n = Simplify[ResourceFunction["NormalVector"][uhelix, t], a > 0 && b > 0 && t > 0]
Out[12]=

The curvature times the normal vector is equal to the derivative of the tangent vector:

In[13]:=
\[Kappa] n
Out[13]=

In relation with the Frenet-Serret system, the tangent vector is the first entry of the second List:

In[14]:=
Simplify[PowerExpand[FrenetSerretSystem[uhelix, t]]][[2, 1]]
Out[14]=

Publisher

Enrique Zeleny

Version History

  • 1.0.0 – 28 April 2020

Related Resources

License Information