[Lab 2] Cross Product of Vectors in the y-z Plane

Manipulate[
Module[{vv,ww,angles,proj,cros},
vv=Normalize[v];
ww=Normalize[w];
cros=(v[[1]]w[[2]]-v[[2]]w[[1]]);
angles=Sort[N@{ArcTan@@vv,ArcTan@@ww}];
Graphics[{Text[Style["-x",Italic],{2.5,2.5},-{1,1}],Text["-4",-{-1.,-1.}2,{0,1}],Text["4",{-1.,-1.}2,{0,1}],Point[{-1.,-1.}2],Point[-{-1.,-1.}2],Text["-3",-{-1.,-1.}3/2,{0,1}],Text["3",{-1.,-1.}3/2,{0,1}],Point[{-1.,-1.}3/2],Point[-{-1.,-1.}3/2],Text["-2",-{-1.,-1.},{0,1}],Text["2",{-1.,-1.},{0,1}],Point[{-1.,-1.}],Point[-{-1.,-1.}],Text["-1",-{-1.,-1.}/2,{0,1}],Text["1",{-1.,-1.}/2,{0,1}],Point[{-1.,-1.}/2],Point[-{-1.,-1.}/2],
{GrayLevel[0.9],Line[{{-2,-2},{2,2}}]},{If[showPar,{If[cros>0,RGBColor[1,0.6,0.7],RGBColor[0.6,0.7,1]],Polygon[{{0,0},v,v+w,w}]},{}]},

{If[cros<0,Hue[.7],RGBColor[1,.47,0]],Circle[{0,0},.3,If[-Subtract@@angles<π,angles,Reverse[angles]+{0,2π}]]},


{GrayLevel[0],Arrow[{{0,0},v}]},{GrayLevel[0],Arrow[{{0,0},w}]},{If[cros>0,RGBColor[1,.47,0],ColorData["HTML","SlateBlue"]],Arrow[{{0,0},cros{-1/2,-1/2}}]},Text["(OverVector[v])",v 3/4,{1,1}],Text["(OverVector[w])",3w/4,{1,1}],Text["(OverVector[v]) \[Cross] (OverVector[w])",cros{-1/2,-1/2},{1,1}]
},Axes->True,Ticks->True,PlotRange->3,AxesLabel->{Style["y",Italic],Style["z",Italic]},PlotLabel->Grid[{{If[cros>0,Style["acute or obtuse angle",RGBColor[1,.47,0]],Style["reflex angle",ColorData["HTML","SlateBlue"]]],Row[{"|(OverVector[v]) \[Cross] (OverVector[w])| = ",NumberForm[Abs[cros],{4,3},ExponentFunction->(Null&)]}]}},ItemSize->10],ImageSize->{400,400}]],

{{showPar,True,"show parallelogram"},{True,False}},
{{v,{1.,0.5}},{-3,-3},{3,3},Locator,Appearance->None,Exclusions->{0,0}},
{{w,{-2.,1.}},{-3,-3},{3,3},Locator,Appearance->None,Exclusions->{0,0}}
]

You can “grab” the tip of either vector and drag it around. (OverVector[v])and (OverVector[w]) are only ever in the y- z plane.

CAPTION

This Demonstration shows the cross product (OverVector[v])×(OverVector[w]) of the vectors (OverVector[v]) and (OverVector[w]). Since both vectors are in the y-z  plane, the resulting vector is on the x axis.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Cross Product of Vectors in the y-z Plane" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/CrossProductOfVectorsInTheYZPlane/

Contributed by: Izidor Hafner

Based on a program by: Bruce Torrence

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »