public static double CalculeteDistance(Point3D firstPoint, Point3D secondPoint) { double distance = Math.Sqrt(Math.Pow(firstPoint.X - secondPoint.X, 2) + Math.Pow(firstPoint.Y - secondPoint.Y, 2) + Math.Pow(firstPoint.Z - secondPoint.Z, 2)); return distance; }
static void Main(string[] args) { Point3D point1 = new Point3D(1, 1, 1); Point3D point2 = new Point3D(2, 2, 2); Point3D point3 = new Point3D(3, 15, 3); Path path = new Path(); path.AddPoint(point1); path.AddPoint(point2); path.AddPoint(point3); PathStorage.SavePath(path); }
//Adding point to point sequence public void AddPoint(Point3D newPoint) { sequencePoints.Add(newPoint); }