using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter1.Section3 { public class Example12 { public Example12() { } private string result; public string Result { get{return result;} } public void Compute() { V.Point Q = new V.Point(3); Q[0] = 2.0; Q[1] = 0.0; Q[2] = -1.0; V.Plane pl = new V.Plane(); V.Vector n = 3.0 * V.UnitVector.i - 2.0 * V.UnitVector.j + 8.0 * V.UnitVector.k; pl.Normal = n; V.Vector a = 0.5 * V.UnitVector.j; pl.ThroughTip = a; V.Distance d = new V.Distance(); double res = d.FromPointToPlane(Q, pl); result += res.ToString() + "\r\n"; result += (1.0/Math.Sqrt(77.0)).ToString() + "\r\n"; } } } // 0.113960576459638 // 0.113960576459638