Class CartesianPoint

    • Constructor Detail

      • CartesianPoint

        public CartesianPoint​(double x,
                              double y,
                              double z)
        constructs a new CartesianPoint.
        Parameters:
        x - double; x
        y - double; y
        z - double; z
      • CartesianPoint

        public CartesianPoint​(double[] xyz)
        constructs a new CartesianPoint.
        Parameters:
        xyz - double[]; x,y,z
      • CartesianPoint

        public CartesianPoint​(Point2D point2D)
        constructs a new CartesianPoint.
        Parameters:
        point2D - Point2D; a 2D point
    • Method Detail

      • to2D

        public Point2D to2D()
        returns the 2D representation of the point.
        Returns:
        Point2D the result
      • toSphericalPoint

        public SphericalPoint toSphericalPoint()
        converts the point to a sperical point.
        Returns:
        the spherical point
      • toSphericalPoint

        public static SphericalPoint toSphericalPoint​(CartesianPoint point)
        converts a cartesian point to a sperical point. See https://mathworld.wolfram.com/SphericalCoordinates.html
        Parameters:
        point - CartesianPoint; the cartesian point
        Returns:
        the spherical point