using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter11 { /// /// Example01: The Vector Product /// Two vectors lying in the xy plane are given /// by the equations A = 2i + 3j and B = -i + 2j. /// Find A \times B and verify that A \times B = - B \times A. /// public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { L.Vector A = new L.Vector(); A.X = 2.0; A.Y = 3.0; A.Z = 0.0; L.Vector B = new L.Vector(); B.X = -1.0; B.Y = 2.0; B.Z = 0.0; L.Vector C = A%B; result += C.ToString()+"\r\n"; C = B%A; result += C.ToString()+"\r\n"; L.Vector D = ((2.0*L.UnitVector.i)+(3.0*L.UnitVector.j))% ((-1.0*L.UnitVector.i)+(2.0*L.UnitVector.j)); result += D.ToString(); } } } //0 +/- 0 i +0 +/- 0 j +7 +/- 0 k //0 +/- 0 i +0 +/- 0 j -7 +/- 0 k //0 +/- 0 i +0 +/- 0 j +7 +/- 0 k