Documentation of 'jhpro.fit.FitCircle2D' Java class
FitCircle2D
jhpro.fit

Class FitCircle2D



  • public class FitCircle2D
    extends java.lang.Object
    Class Circle handles a circle (or a portion of circle) which approximates a collection of data points. Besides usual characteristics of a circle (center, radius), and of a circle arc (start and stop angles) it also defines the approximating bezier curve.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FitCircle2D(double[] x, double[] y)
      Creates a new instance of Circle, defined by a set of points.
      FitCircle2D(P1D p)
      Creates a new instance of Ellipse, defined by P1D
      FitCircle2D(java.awt.geom.Point2D left, java.awt.geom.Point2D middle, java.awt.geom.Point2D right, double[] x, double[] y)
      Creates a new instance of Circle, fitted to 3 defining points.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void doc()
      Show online documentation.
      java.awt.geom.Point2D.Double getCenter()
      Report the circle center.
      Circle getCircle()
      Return fitted circle.
      java.awt.geom.CubicCurve2D.Double getCurve()
      Report the Bezier curve which best approximates the circle arc.
      double getDistance()
      Report the mean distance between the data points and the circle.
      java.lang.Double getRadius()
      Report the circle radius.
      java.lang.Double getStartAngle()
      Report the angle at start of the circle arc.
      java.lang.Double getStopAngle()
      Report the angle at stop of the circle arc.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FitCircle2D

        public FitCircle2D(double[] x,
                           double[] y)
        Creates a new instance of Circle, defined by a set of points.
        Parameters:
        x - array of abscissae
        y - array of ordinates
      • FitCircle2D

        public FitCircle2D(P1D p)
        Creates a new instance of Ellipse, defined by P1D
        Parameters:
        P1D - input
      • FitCircle2D

        public FitCircle2D(java.awt.geom.Point2D left,
                           java.awt.geom.Point2D middle,
                           java.awt.geom.Point2D right,
                           double[] x,
                           double[] y)
        Creates a new instance of Circle, fitted to 3 defining points. The provided collection of coordinates is used only to compute the resulting distance.
        Parameters:
        left - left defining point
        middle - middle defining point
        right - right defining point
        x - array of abscissae (including the defining points)
        y - array of ordinates (including the defining points)
    • Method Detail

      • getCenter

        public java.awt.geom.Point2D.Double getCenter()
        Report the circle center.
        Returns:
        the center of the circle
      • getCurve

        public java.awt.geom.CubicCurve2D.Double getCurve()
        Report the Bezier curve which best approximates the circle arc.
        Returns:
        the Bezier curve
      • getDistance

        public double getDistance()
        Report the mean distance between the data points and the circle.
        Returns:
        the mean distance
      • getRadius

        public java.lang.Double getRadius()
        Report the circle radius.
        Returns:
        the circle radius
      • getStartAngle

        public java.lang.Double getStartAngle()
        Report the angle at start of the circle arc.
        Returns:
        the starting angle, in radians
      • getStopAngle

        public java.lang.Double getStopAngle()
        Report the angle at stop of the circle arc.
        Returns:
        the stopping angle, in radians
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getCircle

        public Circle getCircle()
        Return fitted circle.
        Returns:
        fitted circle.
      • doc

        public void doc()
        Show online documentation.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.