Documentation of 'jsci.maths.CoordinateMath' Java class
CoordinateMath
jsci.maths

Class CoordinateMath



  • public final class CoordinateMath
    extends AbstractMath
    The coordinate transformation math library. Provides common coordinate tranformations. This class cannot be subclassed or instantiated because all methods are static.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double[] cartesianToCylindrical(double x, double y, double z)
      Converts 3D cartesian coordinates to cylindrical coordinates.
      static double[] cartesianToPolar(double x, double y)
      Converts cartesian coordinates to polar coordinates.
      static double[] cartesianToSpherical(double x, double y, double z)
      Converts 3D cartesian coordinates to spherical polar coordinates.
      static double[] cylindricalToCartesian(double r, double phi, double h)
      Converts cylindrical coordinates to cartesian coordinates.
      static double[] cylindricalToSpherical(double r, double phi, double h)
      Converts cylindrical coordinates to spherical polar coordinates.
      static double[] polarToCartesian(double r, double theta)
      Converts polar coordinates to cartesian coordinates.
      static double[] sphericalToCartesian(double r, double theta, double phi)
      Converts spherical polar coordinates to 3D cartesian coordinates.
      static double[] sphericalToCylindrical(double r, double theta, double phi)
      Converts spherical coordinates to cylindrical coordinates.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cartesianToPolar

        public static double[] cartesianToPolar(double x,
                                                double y)
        Converts cartesian coordinates to polar coordinates.
        Returns:
        an array with [0] containing the radius and [1] containing the angle.
      • polarToCartesian

        public static double[] polarToCartesian(double r,
                                                double theta)
        Converts polar coordinates to cartesian coordinates.
        Returns:
        an array with [0] containing the x-coordinate and [1] containing the y-coordinate.
      • cartesianToSpherical

        public static double[] cartesianToSpherical(double x,
                                                    double y,
                                                    double z)
        Converts 3D cartesian coordinates to spherical polar coordinates.
        Returns:
        an array with [0] containing the radius, [1] containing the theta angle and [2] containing the phi angle.
      • sphericalToCartesian

        public static double[] sphericalToCartesian(double r,
                                                    double theta,
                                                    double phi)
        Converts spherical polar coordinates to 3D cartesian coordinates.
        Returns:
        an array with [0] containing the x-coordinate, [1] containing the y-coordinate and [2] containing the z-coordinate.
      • cartesianToCylindrical

        public static double[] cartesianToCylindrical(double x,
                                                      double y,
                                                      double z)
        Converts 3D cartesian coordinates to cylindrical coordinates.
        Returns:
        an array with [0] containing the radius, [1] containing the angle and [2] containing the height.
      • cylindricalToCartesian

        public static double[] cylindricalToCartesian(double r,
                                                      double phi,
                                                      double h)
        Converts cylindrical coordinates to cartesian coordinates.
        Returns:
        an array with [0] containing the x-coordinate, [1] containing the y-coordinate and [2] containing the z-coordinate.
      • cylindricalToSpherical

        public static double[] cylindricalToSpherical(double r,
                                                      double phi,
                                                      double h)
        Converts cylindrical coordinates to spherical polar coordinates.
        Returns:
        an array with [0] containing the radius, [1] containing the theta angle and [2] containing the phi angle.
      • sphericalToCylindrical

        public static double[] sphericalToCylindrical(double r,
                                                      double theta,
                                                      double phi)
        Converts spherical coordinates to cylindrical coordinates.
        Returns:
        an array with [0] containing the radius, [1] containing the angle and [2] containing the height.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.