Curvature of curves This worksheet contains tools to create animated pictures of plane curves or space curves together with their Frenet coordinate system.
<Text-field style="Heading 1" layout="Heading 1">Plane curves</Text-field> Tool to create animated pictures of plane curves together with their - tangent vector, - normal vector, - "acceleration vector" (second derivative) - osculating circle, - curvature function. LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2I1EhRic= Just place the cursor on the red word "restart" below and press enter. If you want to create a picture of your own curve you can change the definitions marked with "(can be modified)" below. restart:with(plots):with(plottools): place the cursor on the red word "restart" and press enter To start the animations, right-click in the graphic and choose > Animation > Play . Name:="Lissajous-Kurve": the name of the curve (can be modified to plot a different curve) x(t):=cos(3*t): x-coordinate of the curve (can be modified to plot a different curve) y(t):=sin(2*t): y-coordinate of the curve (can be modified to plot a different curve) Length:=4.86*Pi: the (approximate) total length of the curve (can be modified to plot a longer curve) n:=100: the number of frames of the animated motion (can be modified) Note: it is not necessary to give the curve parametrized by arc length, that is, such that it evolves with constant velocity. The algorithm below is trying to create frames of the motion which simulate movement with constant velocity by increasing the parameter "t" in such steps that the steps of the arc length approximately equal "Length/n". Since this is achieved only approximately, the specified value of "Length" will only be the approximate total length of the curve. c(t):=<x(t),y(t)>: the curve as function in t with values in R^2 dx(t):=diff(x(t),t): dy(t):=diff(y(t),t): the derivatives with respect to "t" dc(t):=<dx(t),dy(t)>: the tangent vector to the curve at time "t" v(t):=simplify(sqrt(dx(t)^2+dy(t)^2)): the velocity; it is equal to the length of the tangent vector "dc(t)" T(t):=simplify(dc(t)/v(t)): the tangent unit vector which is normalized to length 1 N(t):=simplify(<-dy(t),dx(t)>/v(t)): the normal unit vector ddx(t):=diff(x(t),[t\$2]): ddy(t):=diff(y(t),[t\$2]): the second derivatives with respect to "t" kappa(t):=simplify((dx(t)*ddy(t)-ddx(t)*dy(t))/v(t)^3): the curvature at time "t" K(t):=simplify(kappa(t)*N(t)): the "acceleration vector" (the second derivative of the curve with respect to the arc length) R(t):=1/kappa(t): M(t):=c(t)+R(t)*N(t): the radius and center of the osculating circle The algorithm to plot "n" frames containing the curve, its various vectors, the osculating circle, and the curvature function: t[-1]:=0: Deltat[-1]:=0: initial values for i from 0 to n do creates the i-th frame t[i]:=evalf(t[i-1]+Deltat[i-1]): increases the parameter "t" by step "Delta[i-1]" RedCurve[i]:=plot([x(t),y(t),t=0..t[i]],thickness=5): plots the red curve in the i-th frame Tangentvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(T(t),t=t[i])),.1,.2,.1,colour=green): computes its tangent unit vector in the i-th frame Normalvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(N(t),t=t[i])),.1,.2,.1,colour=yellow): computes the normal unit vector in the i-th frame Curvature[i]:=evalf(eval(kappa(t),t=t[i])): computes the curvature in the i-th frame Curvaturefunction[i]:=display(plot(kappa(t),t=0..t[i],color=blue, thickness=2)): plots the curvature function in the i-th frame Accelerationvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(K(t),t=t[i])),.03,.1,.1,colour=blue): computes the "acceleration vector" in the i-th frame Osculatingcircle[i]:=circle(convert(evalf(eval(M(t), t = t[i])), list),evalf(eval(R(t),t=t[i])),colour=black,thickness=0): plots the osculating circle in the i-th frame CurveWithT[i]:=display((RedCurve[i],Tangentvector[i]), title=cat(Name," mit Tangentialvektor"),titlefont=[TIMES,BOLD,14]): plots the curve with tangent unit vector in the i-th frame CurveWithTandN[i]:=display((RedCurve[i],Tangentvector[i],Normalvector[i]), title=cat(Name," mit Tangentialvektor (gr\303\274n) und Normalenvektor (gelb)"),titlefont=[TIMES,BOLD,14]): plots the curve with tangent unit vector and normal unit vector in the i-th frame CurveWithTNandK[i]:=display((RedCurve[i],Tangentvector[i],Accelerationvector[i],Normalvector[i]), title=cat(Name," mit Tangentialvektor (gr\303\274n), Normalenvektor (gelb) und \134"Beschleunigungsvektor\134" (blau)"),titlefont=[TIMES,BOLD,14], view=[-2..2,-2..2],scaling=constrained): plots the curve with tangent unit vector, normal unit vector and acceleration vector in the i-th frame CurveWithTNKandCircle[i]:=display((RedCurve[i],Tangentvector[i],Accelerationvector[i],Normalvector[i],Osculatingcircle[i]), title=cat(Name," mit Tangentialvektor (gr\303\274n), Normalenvektor (gelb), \134"Beschleunigungsvektor\134" (blau) und Kr\303\274mmungskreis"), titlefont=[TIMES,BOLD,14], view=[-2..2,-2..2],scaling=constrained): plots the curve with tangent unit vector, normal unit vector, acceleration vector, and osculating circle in the i-th frame Deltat[i]:=evalf(eval(Length/(n*v(t)),t=t[i])): the increment of the parameter "t" such that the arc length approximately increases by "Length / n" end do: Now all "n" frames are created. BlackCurve:=plot([x(t),y(t),t=0..t[n]],thickness=1,color=black): plots the black curve in all frames The frames are put together to movies: display(seq(RedCurve[i],i=0..n),insequence=true,labels=[x,y],scaling=constrained, title=Name,titlefont=[TIMES,BOLD,14]); plots the curve evolving in time display(seq(display(BlackCurve,CurveWithT[i]),i=0..n),insequence=true,labels=[x,y],scaling=constrained); plots the curve with tangent unit vector display(seq(display(BlackCurve,CurveWithTandN[i]),i=0..n),insequence=true,labels=[x,y],scaling=constrained); plots the curve with tangent unit vector and normal unit vector display(seq(display(BlackCurve,CurveWithTNandK[i]),i=0..n),insequence=true,labels=[x,y],scaling=constrained); plots the curve with tangent unit vector, normal unit vector and acceleration vector display(seq(display(BlackCurve,CurveWithTNKandCircle[i]),i=0..n),insequence=true,labels=[x,y],scaling=constrained); plots the curve with tangent unit vector, normal unit vector, acceleration vector, and osculating circle display(Array(1..2,1..1,[[display((seq(display((BlackCurve,CurveWithTNandK[i]),labels=[x,y],scaling=constrained,view=[-2..2,-2..2]),i=0..n)),insequence=true)],[display((seq(display(Curvaturefunction[i]),i=0..n)),insequence=true,labelfont=[TIMES,BOLD,14],labels=[" ",Kr\303\274mmung])]])); plots the curve with tangent unit vector, normal unit vector and acceleration vector, and in a separate box the graph of the curvature function
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2I1EhRic=
<Text-field style="Heading 1" layout="Heading 1">Space curves</Text-field> Tool to create animated pictures of space curves together with their - tangent vector, - normal vector, - binormal vector, - curvature function, and - torsion function. Just place the cursor on the red word "restart" and press enter. If you want to create a picture of your own curve you can change the definitions marked with "(can be modified)" below. restart:with(plots):with(plottools):with(LinearAlgebra): place the cursor on the red word "restart" and press enter To start the animations, right-click in the graphic and chose > Animation > Play . Name:="Torus-Knoten": the name of the curve (can be modified to plot a different curve) x(t):=1/6*(cos(3*t)+5)*cos(2*t): x-coordinate of the curve (can be modified to plot a different curve) y(t):=1/6*(cos(3*t)+5)*sin(2*t): y-coordinate of the curve (can be modified to plot a different curve) z(t):=1/6*sin(3*t): z-coordinate of the curve (can be modified to plot a different curve) Length:=3.5*Pi: the (approximate) total length of the curve (can be modified to plot a longer curve) n:=100: the number of frames of the animated motion (can be modified) Note: it is not necessary to give the curve parametrized by arc length, that is, such that it evolves with constant velocity. The algorithm below is trying to create frames of the motion which simulate movement with constant velocity by increasing the parameter "t" in such steps that the steps of the arc length approximately equal "Length/n". Since this is achieved only approximately, the specified value of "Length" will only be the approximate total length of the curve. c(t):=<x(t),y(t),z(t)>: the curve as function in t with values in R^3 dx(t):=diff(x(t),t): dy(t):=diff(y(t),t): dz(t):=diff(z(t),t): the derivatives with respect to "t" dc(t):=<dx(t),dy(t),dz(t)>: the tangent vector to the curve at time "t" v(t):=simplify(sqrt(dx(t)^2+dy(t)^2+dz(t)^2)): the velocity; it is equal to the length of the tangent vector "dc(t)" T(t):=simplify(dc(t)/v(t)): the tangent unit vector which is normalized to length 1 ddx(t):=diff(x(t),[t\$2]): ddy(t):=diff(y(t),[t\$2]): ddz(t):=diff(z(t),[t\$2]): ddc(t):=<ddx(t),ddy(t),ddz(t)>: the second derivatives with respect to "t" dc_times_ddc(t):=dc(t)&x ddc(t): the cross product vector l(t):=sqrt(DotProduct(dc_times_ddc(t),dc_times_ddc(t),conjugate=false)): the length of this cross product vector B(t):=simplify(dc_times_ddc(t)/l(t)): the binormal unit vector at time "t" N(t):=simplify(B(t)&x T(t)): the normal unit vector kappa(t):=simplify(l(t)/v(t)^3): the curvature at time "t" K(t):=simplify(kappa(t)*N(t)): the acceleration vector (the second derivative of the curve with respect to the arc length) dddx(t):=diff(x(t),[t\$3]): dddy(t):=diff(y(t),[t\$3]): dddz(t):=diff(z(t),[t\$3]): dddc(t):=<dddx(t),dddy(t),dddz(t)>: the third derivatives with respect to "t" tau(t):=DotProduct(dc_times_ddc(t),dddc(t),conjugate=false)/l(t)^2: the torsion at time "t" The algorithm to plot "n" frames containing the curve, its various vectors, the curvature and the torsion function: t[-1]:=0: Deltat[-1]:=0: initial values for i from 0 to n do creates the i-th frame t[i]:=evalf(t[i-1]+Deltat[i-1]): increases the parameter "t" by step "Delta[i-1]" RedCurve[i]:=spacecurve([x(t),y(t),z(t)],t=0..t[i],thickness=5,color=red): plots the red curve in the i-th frame BlackCurve[i]:=spacecurve([x(t),y(t),z(t)],t=0..Length,thickness=1,color=black): plots the black curve in the i-th frame Tangentvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(T(t),t=t[i])),.1,.2,.1,cylindrical_arrow,colour=RGB(1,165/255,0)): computes its tangent unit vector in the i-th frame Normalvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(N(t),t=t[i])),.1,.2,.1, cylindrical_arrow,colour=RGB(0,128/255,0)): computes the normal unit vector in the i-th frame Binormalvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(B(t),t=t[i])),.1,.2,.1, cylindrical_arrow,colour=blue): computes the binormal unit vector in the i-th frame Curvature[i]:=evalf(eval(kappa(t),t=t[i])): computes the curvature in the i-th frame Curvaturefunction[i]:=display(plot(kappa(t),t=0..t[i],color="Green", thickness=2),labels=[t,Curvature]): plots the curvature function in the i-th frame Torsion[i]:=evalf(eval(tau(t),t=t[i])): computes the torsion in the i-th frame Torsionfunction[i]:=display(plot(tau(t),t=0..t[i],color=blue, thickness=2),labels=[t,Torsion]): plots the torsion function in the i-th frame Accelerationvector[i]:=arrow(evalf(eval(c(t),t=t[i])),evalf(eval(K(t),t=t[i])),.03,.1,.1,colour=blue): computes the "acceleration vector" in the i-th frame Curve[i]:=display3d((RedCurve[i]), title=Name,titlefont=[TIMES,BOLD,14]): plots the curve in the i-th frame CurveWithT[i]:=display3d((Tangentvector[i],Curve[i]), title=cat(Name," mit Tangentialvektor"),titlefont=[TIMES,BOLD,14]): plots the curve with tangent unit vector in the i-th frame CurveWithTandN[i]:=display3d((Tangentvector[i],Normalvector[i],Curve[i]), title=cat(Name," mit Tangentialvektor (braun) und Normalenvektor (gr\303\274n)"),titlefont=[TIMES,BOLD,14]): plots the curve with tangent unit vector and normal unit vector in the i-th frame CurveWithTNandB[i]:=display3d((Tangentvector[i],Binormalvector[i],Normalvector[i],Curve[i]), title=cat(Name," mit Tangentialvektor (braun), Normalenvektor (gr\303\274n) und Binormalenvektor (blau)"),titlefont=[TIMES,BOLD,14],scaling=constrained): plots the curve with tangent unit vector, normal unit vector and binormal vector in the i-th frame Deltat[i]:=evalf(eval(Length/(n*v(t)),t=t[i])): the increment of the parameter "t" such that the arc length approximately increases by "Length / n" end do: Now all frames are created . . . . . . and they are put together to movies: display3d(seq(Curve[i],i=0..n),insequence=true,labels=[x,y,z],scaling=constrained); plots the curve evolving in time display3d(seq(CurveWithT[i],i=0..n),insequence=true,labels=[x,y,z],scaling=constrained); plots the curve with tangent unit vector display3d(seq(CurveWithTandN[i],i=0..n),insequence=true,labels=[x,y,z],scaling=constrained); plots the curve with tangent unit vector and normal unit vector display3d(seq(CurveWithTNandB[i],i=0..n),insequence=true,labels=[x,y,z],scaling=constrained); plots the curve with tangent unit vector, normal unit vector and binormal vector display3d(Array(1..2,1..1,[[display((seq(display(CurveWithTNandB[i],labels=[x,y,z],scaling=constrained),i=0..n)),insequence=true)],[display((seq(display(Curvaturefunction[i],Torsionfunction[i]),i=0..n)),labelfont=[TIMES,BOLD,14],labels=[" ","Kr\303\274mmung\134n (gr\303\274n)\134n\134n Torsion\134n (blau)"],insequence=true)]])); plots the curve with tangent unit vector, normal unit vector and acceleration vector, and in a separate box the graph of the curvature function
LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2I1EhRic=
<Text-field style="Heading 1" layout="Heading 1">Copyright</Text-field> Urs Hartl 2012 This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license (http://creativecommons.org/licenses/by-sa/3.0/deed.en). You are free: to share \342\200\223 to copy, distribute and transmit the work to remix \342\200\223 to adapt the work Under the following conditions: attribution \342\200\223 You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). share alike \342\200\223 If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
JSFH