using System; using System.Collections.Generic; using System.Linq; using System.Text; using V = Science.Mathematics.VectorCalculus; namespace VectorCalculus5Ed.Chapter1.Section4 { public class Example01 { public Example01() { } private string result; public string Result { get{return result;} } public void Compute() { V.Coordinates c = new V.Coordinates(); c.CartesianX = 6.0; c.CartesianY = 6.0; c.CartesianZ = 8.0; c.FromCartesianToCylindrical(); result += c.CylindricalR.ToString() + " " + c.CylindricalTheta.ToString() + " " + c.CylindricalZ.ToString() + "\r\n"; result += (6.0*Math.Sqrt(2.0)).ToString() + " " + (Math.PI/4.0).ToString() + " " + (8.0).ToString() + "\r\n"; V.Coordinates d = new V.Coordinates(); d.CylindricalR = 8.0; d.CylindricalTheta = 2.0*Math.PI/3.0; d.CylindricalZ = 8.0; d.FromCylindricalToCartesian(); result += d.CartesianX.ToString() + " " + d.CartesianY.ToString() + " " + d.CartesianZ.ToString() + "\r\n"; result += (-4.0).ToString() + " " + (4.0*Math.Sqrt(3.0)).ToString() + " " + (8.0).ToString() + "\r\n"; } } } /* 8.48528137423857 0.785398163397448 8 8.48528137423857 0.785398163397448 8 -4 6.92820323027551 8 -4 6.92820323027551 8 */