Example #1
0
        static void Main()
        {
            _3DPoint point1 = new _3DPoint(1, 1, 1);
            _3DPoint point2 = new _3DPoint(2.5, -0.5, 12.01);

            Console.WriteLine(point1);
            Console.WriteLine(point2);
        }
Example #2
0
        static void CalcDistance(_3DPoint p1, _3DPoint p2)
        {
            double deltaX = p2.X - p1.X;
            double deltaY = p2.Y - p1.Y;
            double deltaZ = p2.Z - p1.Z;

            double distance = (double)Math.Sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ);

            Console.WriteLine("The distance between the point is: {0}", distance);
        }
Example #3
0
 public void AddPointToPath(_3DPoint point)
 {
     var currentPath = this.Path;
     currentPath.Add(point);
     this.Path = currentPath;
 }