Chapter 10 - The Geometry of Linear and Affine Maps

Section 10.5 - Affine Maps

Example 10.5.1

A={{-3,1,7},{1,9,3},{-1,19,13},{4,8,-4}};

B={{8},{-5},{-2},{-13}};

RowReduce[Join[A,B,2]]//MatrixForm

LineL=ParametricPlot3D[{15/7 t-11/4,-4/7 t-1/4,t},{t,-3,3},PlotStyle->{Thickness[0.007],Blue}];

LineL0=ParametricPlot3D[{15/7 t,-4/7 t,t},{t,-3,3},PlotStyle->{Thickness[0.007],Red}];

PtsPlot=Graphics3D[{Black,Sphere[{0,0,0},0.2],Black,Sphere[{-11/4,-1/4,0},0.2]}];

ArrowPlot=Graphics3D[{Arrowheads[.05],Thickness[.007],Black,Arrow[{{0,0,0},{-11/4,-1/4,0}}]}];

TxtPlots=Graphics3D[{Black,Text["O",{0,0,0.5}],Text["P",{-11/4,-1/4,0.5}]}];

Show[LineL,LineL0,PtsPlot,ArrowPlot,TxtPlots,PlotRange->All]

Example 10.5.2

X={9,4,1};Y={-5,17,-6};Z={3,-8,-2};W={11,3,-15};

R={{Z[[1]]},{W[[1]]},{Z[[2]]},{W[[2]]},{Z[[3]]},{W[[3]]}};

(d={{X[[1]],Y[[1]],0,0,1,0},{0,0,X[[1]],Y[[1]],0,1},{X[[2]],Y[[2]],0,0,1,0},{0,0,X[[2]],Y[[2]],0,1},{X[[3]],Y[[3]],0,0,1,0},{0,0,X[[3]],Y[[3]],0,1}})//MatrixForm

(AB=Inverse[d].R)//MatrixForm

(A={{AB[[1,1]],AB[[2,1]]},{AB[[3,1]],AB[[4,1]]}})//MatrixForm

(B={{AB[[5,1]]},{AB[[6,1]]}})//MatrixForm

(A.{X[[1]],Y[[1]]}+B)//MatrixForm

(A.{X[[2]],Y[[2]]}+B)//MatrixForm

(A.{X[[3]],Y[[3]]}+B)//MatrixForm

Example 10.5.3

A = (({{(α^2)+(1-(α^2)) Cos[θ], α β-α β Cos[θ]+δ Sin[θ], α δ-α δ Cos[θ]-β Sin[θ]}, {α β-α β Cos[θ]-δ Sin[θ], (β^2)+(1-(β^2)) Cos[θ], β δ-β δ Cos[θ]+α Sin[θ]}, {α δ-α δ Cos[θ]+β Sin[θ], β δ-β δ Cos[θ]-α Sin[θ], (δ^2)+(1-(δ^2)) Cos[θ]}}));

Q={4,-7,13};P={11,25,-7};w={5,2,9};

v=w/Norm[w];

Av=A/.{α->v[[1]],β->v[[2]],δ->v[[3]]};

B=(IdentityMatrix[3]-Av).P;

CenterPt=Simplify[(v.Q) v+P]

LinePlotv=Graphics3D[{Thickness[.004],Red,Line[{-2 v+P,22 v+P}]},Axes->True];

PlotPQCenterPt=Graphics3D[{Blue,Sphere[Q,1.5],Blue,Sphere[P,1.5],Black,Sphere[CenterPt,1.5],Black,Sphere[{0,0,0},1.5]}];

TxtPlots=Graphics3D[{Black,Text["O",{0,0,-4}],Text["C",{16,29,7}],Text["P",{11,25,-12}],Text["Q",{4,-7,18}]}];

Manipulate[AvQB=Evaluate[N[Av.Q+B]/.{θ->tval}];
NewPtPlotExp=Graphics3D[{Blue,Sphere[AvQB,1.5]}];
ArrowPlotExp=Graphics3D[{Arrowheads[.04],Thickness[.007],Black,Arrow[{CenterPt,AvQB}]}];
Show[TxtPlots,LinePlotv,NewPtPlotExp,ArrowPlotExp,PlotPQCenterPt,PlotRange->{{-40,60},{-20,65},{-30,30}},Axes->True],{{tval,0,"θ"},0,6π,π/24}]

PtsQ=Table[Evaluate[N[Av.Q+B]/.{θ->tval}],{tval,0,2π,π/24}];

PlotAllPtsQ=Table[Graphics3D[{Blue,Sphere[Evaluate[N[Av.Q+B]/.{θ->tval}],0.5]}],{tval,0,2π,π/32}];

Show[TxtPlots,LinePlotv,PlotAllPtsQ,PlotPQCenterPt,PlotRange->{{-40,60},{-20,65},{-30,30}},Axes->True,AspectRatio->1]

Rotations in Space module

RotationsInSpace[v_,P_,Q_,θ_]:=Module[{w,α,β,δ,Av,B},
w=v/Norm[v];
α=w[[1]];β=w[[2]];δ=w[[3]];
A = (({{(α^2)+(1-(α^2)) Cos[θ], α β-α β Cos[θ]+δ Sin[θ], α δ-α δ Cos[θ]-β Sin[θ]}, {α β-α β Cos[θ]-δ Sin[θ], (β^2)+(1-(β^2)) Cos[θ], β δ-β δ Cos[θ]+α Sin[θ]}, {α δ-α δ Cos[θ]+β Sin[θ], β δ-β δ Cos[θ]-α Sin[θ], (δ^2)+(1-(δ^2)) Cos[θ]}}));
Av=A/.{α->w[[1]],β->w[[2]],δ->w[[3]]};
B=P-A.P;
Return[A.Q+B];]

Q1=N[RotationsInSpace[{5,2,9},{11,25,-7},{4,-7,13},π/3]]

v={5,2,9};

w=v/Norm[v];

P={11,25,-7};Q={4,-7,13};

Cntr=Simplify[(w.Q) w+P]

N[Norm[Q-Cntr]]

N[Norm[Q1-Cntr]]