FitCircle2D
jhpro.fit

Class FitCircle2D



  • public class FitCircle2Dextends 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 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(Point2D left,           Point2D middle,           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 Point2D.Double getCenter()
        Report the circle center.
        Returns:
        the center of the circle
      • getCurve

        public 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 Double getRadius()
        Report the circle radius.
        Returns:
        the circle radius
      • getStartAngle

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

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

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

        public void doc()
        Show online documentation.

SCaVis 1.7 © jWork.org