Chapter 7 - A Few Advanced Vector Algebra Topics

Section 7.1 - Rotations in Space

Example 7.1.1

P={-2,1,4};Q={3,5,9};

Cntr=P.Q/P.P P

Rad=Norm[Q-Cntr]

U=(Q-Cntr)/Rad

V=Cross[Cntr,U]/Norm[Cross[Cntr,U]]

CircleRotation=Cntr+Rad Cos[A] U+Rad Sin[A] V

SpaceCircle=ParametricPlot3D[CircleRotation,{A,0,2π},PlotStyle->{Blue}];

NewPt=CircleRotation/.{A->π/3}

PtsPlot1=Graphics3D[{Black,Sphere[Q,0.5],Black,Sphere[NewPt,0.5],Black,Sphere[Cntr,0.5]}];

TxtPlots1=Graphics3D[{Black,Text["N",{-2.5,10,5}],Text["Q",{3.5,5.5,10}],Text["C",{-3.5,2.5,7.1}],Text["L",{-4,-3,4}]}];

LinePlot1=Graphics3D[{Thickness[.005],Red,Line[{{0,0,0},1.5 Rad P}]}];

Show[SpaceCircle,PtsPlot1,LinePlot1,TxtPlots1]

Example 7.1.2

Helix={6+2/3 Sin[t],2+2/3 Cos[t],5+t/4};

QBot=Helix/.{t->-2π}

QTop=Helix/.{t->3π}

LinePlot2=Graphics3D[{Thickness[.005],Red,Line[{-1.5 Rad P,2.5 Rad P}]}];

HelixOriginal=ParametricPlot3D[Helix,{t,-2π,3π},PlotStyle->{Thickness[.008],Blue}];

Show[HelixOriginal]

OriginSphere=Graphics3D[{Black,Sphere[{0,0,0},0.2]}];

Manipulate[HelixExp=Evaluate[Helix/.{t->tval}];
ArrowPlotExp=Graphics3D[{Arrowheads[.05],Thickness[.005],Red,Arrow[{{0,0,0},HelixExp}]}];
Show[OriginSphere,ArrowPlotExp,HelixOriginal,PlotRange->{{-1,10},{-1,5},{-1,10}},Axes->True],
{{tval,-2π,"t"},-2π,3π,π/6}]

CntrTop=N[P.QTop/P.P P]

CntrBot=N[P.QBot/P.P P]

RadTop=N[Norm[QTop-CntrTop]]

RadBot=N[Norm[QBot-CntrBot]]

UTop=(QTop-CntrTop)/RadTop

UBot=(QBot-CntrBot)/RadBot

VTop=Cross[CntrTop,UTop]/Norm[Cross[CntrTop,UTop]]

VBot=Cross[CntrBot,UBot]/Norm[Cross[CntrBot,UBot]]

CircRotTop=CntrTop+RadTop Cos[A] UTop+RadTop Sin[A] VTop;

CircRotBot=CntrBot+RadBot Cos[A] UBot+RadBot Sin[A] VBot;

SpaceCirclePlots=ParametricPlot3D[{CircRotTop,CircRotBot},{A,0,2π},PlotStyle->{{Thickness[.008],Blue},{Thickness[.008],Red}}];

CntrHelix=P.Helix/P.P P;

RadHelix=Norm[Helix-CntrHelix];

UHelix=(Helix-CntrHelix)/RadHelix;

VHelix=Cross[CntrHelix,UHelix]/Norm[Cross[CntrHelix,UHelix]];

HelixRot=N[CntrHelix+RadHelix Cos[A] UHelix+RadHelix Sin[A] VHelix];

Manipulate[HelixRotExp=Evaluate[HelixRot/.{A->Aval}];
HelixRotExpPlot=ParametricPlot3D[HelixRotExp,{t,-2π,3π},PlotStyle->{Thickness[.008],Black}];
Show[LinePlot2,SpaceCirclePlots,HelixRotExpPlot,PlotRange->{{-10,10},{-10,10},{-10,10}},Axes->True,ViewPoint->{-3,6,3}],{{Aval,0,"θ"},0,2π,π/12}]

Example 7.1.3

Torus={4+(2+Cos[u])Cos[v],7+(2+Cos[u])Sin[v],9+Sin[u]};

ParametricPlot3D[Torus,{u,-π,π},{v,-π,π},Mesh->None]

CntrTorus=P.Torus/P.P P;

RadTorus=Norm[CntrTorus-Torus];

UTorus=(Torus-CntrTorus)/RadTorus;

VTorus=Cross[CntrTorus,UTorus]/Norm[Cross[CntrTorus,UTorus]];

TorusRot=CntrTorus+RadTorus Cos[A] UTorus+RadTorus Sin[A] VTorus;

LinePlot3=Graphics3D[{Thickness[.005],Black,Line[{-1 Rad P,3 Rad P}]}];

Manipulate[TorusRotExp=Evaluate[TorusRot/.{A->Aval}];
TorusRotExpPlot=ParametricPlot3D[TorusRotExp,{u,-π,π},{v,-π,π},Mesh->None];
Show[LinePlot3,TorusRotExpPlot,PlotRange->{{-15,15},{-15,15},{-8,22}},Axes->True,ViewPoint->{-3,6,3}],{{Aval,0,"θ"},0,2π,π/12}]