Documentation of 'math.geom2d.conic.Hyperbola2D' Java class
Hyperbola2D
math.geom2d.conic

Class Hyperbola2D

    • Constructor Detail

      • Hyperbola2D

        public Hyperbola2D()
        Assume centered hyperbola, with a = b = 1 (orthogonal hyperbola), theta=0 (hyperbola is oriented East-West), and direct orientation.
      • Hyperbola2D

        public Hyperbola2D(Hyperbola2D hyp)
        Copy constructor
        Parameters:
        hyp - the hyperbola to copy
      • Hyperbola2D

        public Hyperbola2D(Point2D center,
                           double a,
                           double b,
                           double theta)
      • Hyperbola2D

        public Hyperbola2D(Point2D center,
                           double a,
                           double b,
                           double theta,
                           boolean d)
      • Hyperbola2D

        public Hyperbola2D(double xc,
                           double yc,
                           double a,
                           double b,
                           double theta)
      • Hyperbola2D

        public Hyperbola2D(double xc,
                           double yc,
                           double a,
                           double b,
                           double theta,
                           boolean d)
        Main constructor
    • Method Detail

      • create

        public static Hyperbola2D create(Point2D center,
                                         double a,
                                         double b,
                                         double theta)
      • create

        public static Hyperbola2D create(Point2D center,
                                         double a,
                                         double b,
                                         double theta,
                                         boolean d)
      • reduceCentered

        public static Hyperbola2D reduceCentered(double[] coefs)
        Creates a new Hyperbola by reducing the conic coefficients, assuming conic type is Hyperbola, and hyperbola is centered.
        Parameters:
        coefs - an array of double with at least 3 coefficients containing coefficients for x^2, xy, and y^2 factors. If the array is longer, remaining coefficients are ignored.
        Returns:
        the Hyperbola2D corresponding to given coefficients
      • transformCentered

        public static Hyperbola2D transformCentered(Hyperbola2D hyper,
                                                    AffineTransform2D trans)
        Transforms an hyperbola, by supposing both the hyperbola is centered and the transform has no translation part.
        Parameters:
        hyper - an hyperbola
        trans - an affine transform
        Returns:
        the transformed hyperbola, centered around origin
      • toGlobal

        public Point2D toGlobal(Point2D point)
        Transforms a point in local coordinate (ie orthogonal centered hyberbola with a=b=1) to global coordinate system.
      • getCenter

        public Point2D getCenter()
        Returns the center of the Hyperbola. This point does not belong to the Hyperbola.
        Returns:
        the center point of the Hyperbola.
      • getAngle

        public double getAngle()
        Returns the angle made by the first direction vector with the horizontal axis.
      • getLength1

        public double getLength1()
        Returns a
      • getLength2

        public double getLength2()
        Returns b
      • isDirect

        public boolean isDirect()
      • getVector1

        public Vector2D getVector1()
      • getVector2

        public Vector2D getVector2()
      • getFocus1

        public Point2D getFocus1()
        Returns the focus located on the positive side of the main hyperbola axis.
      • getFocus2

        public Point2D getFocus2()
        Returns the focus located on the negative side of the main hyperbola axis.
      • asymptotes

        public java.util.Collection<StraightLine2D> asymptotes()
        Returns the asymptotes of the hyperbola.
      • conicCoefficients

        public double[] conicCoefficients()
        Description copied from interface: Conic2D
        Returns the coefficient of the Cartesian representation of the conic. Cartesian equation has the form :

        a*x^2 + b*x*y + c*y^2 + d*x + e*y + f

        The length of the array is then of size 6.

        Specified by:
        conicCoefficients in interface Conic2D
      • eccentricity

        public double eccentricity()
        Description copied from interface: Conic2D
        Returns the eccentricity of the conic.
        Specified by:
        eccentricity in interface Conic2D
      • draw

        public void draw(java.awt.Graphics2D g)
        Throws an UnboundedShapeException
        Specified by:
        draw in interface Curve2D
        Specified by:
        draw in interface Shape2D
        Overrides:
        draw in class CurveArray2D<HyperbolaBranch2D>
        Parameters:
        g - the graphics to draw the curve in
      • almostEquals

        public boolean almostEquals(GeometricObject2D obj,
                                    double eps)
        Description copied from interface: GeometricObject2D
        Checks if the two objects are similar up to a given threshold value. This method can be used to compare the results of geometric computations, that introduce errors due to numerical computations.
        Specified by:
        almostEquals in interface GeometricObject2D
        Overrides:
        almostEquals in class CurveArray2D<HyperbolaBranch2D>
        Parameters:
        obj - the object to compare
        eps - a threshold value, for example the minimal coordinate difference
        Returns:
        true if both object have the same value up to the threshold

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.