using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter1.Section1 { public class Example08 { public Example08() { } private string result; public string Result { get{return result;} } public void Compute() { V.Point p = new V.Point(2); p[0] = 3.0; p[1] = 5.0; V.Point q = new V.Point(2); q[0] = 4.0; q[1] = 7.0; V.Vector v = new V.Vector(p,q); result += v.ToString(); p[0] = -1.0; p[1] = 0.0; q[0] = 2.0; q[1] = -3.0; V.Vector v1 = new V.Vector(p, q); p[0] = 2.0; p[1] = 0.0; q[0] = 1.0; q[1] = 1.0; V.Vector w = new V.Vector(p, q); result += (v1+w).ToString(); p[0] = 5.0; p[1] = 6.0; V.Vector x = new V.Vector(p); result += (x + 8.0*v1).ToString(); } } } /* (1,2) (2,-2) (29,-18) */