using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter03 { /// /// Example05: Taking a Hike /// A hiker begins a trip by first walking 25.0 km southeast /// from her car. She stops and sets up her tent for the night. /// On the second day, she walks 40.0 km in a direction 60.0^{\circle} /// north of east, at which point she discovers a forest /// ranger's tower. /// (A) Determine the components of the hiker's displacement /// for each day. /// (B) Determine the components of the hiker's resultant /// displacement R for the trip. Find an expression for R in /// terms of unit vectors. /// public class Example05 { public Example05() { } private string result; public string Result { get{return result;} } public void Compute() { L.Displacement d1 = new L.Displacement(); d1.X = 25.0*Math.Cos(-45.0*Math.PI/180.0); d1.Y = 25.0*Math.Sin(-45.0*Math.PI/180.0); L.Displacement d2 = new L.Displacement(); d2.X = 40.0*Math.Cos(60.0*Math.PI/180.0); d2.Y = 40.0*Math.Sin(60.0*Math.PI/180.0); L.Vector res = d1 + d2; result += res.ToString(); result += Convert.ToString(res.Norm)+" "; } } } // 37.6776695296637 +/- 0 i +16.9633466217139 +/- 0 j +0 +/- 0 k 41.3202360810652