// Create a 3D point Point3D point = new Point3D(1, 2, 3); // Add to the X coordinate point.X += 2; // Add to the Y coordinate point.Y += 3; // Add to the Z coordinate point.Z += 4;
// Create two 3D points Point3D point1 = new Point3D(1, 2, 3); Point3D point2 = new Point3D(4, 5, 6); // Add the two points Point3D sum = Point3D.Add(point1, point2);In this example, we create two Point3D objects (`point1` and `point2`) with different X, Y, and Z coordinates. We then use the `Add` method of the Point3D class to add the two points together and get a new Point3D object (`sum`) that represents the sum of the two points.