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.
        x - array of abscissae
        y - array of ordinates
      • FitCircle2D

        public FitCircle2D(P1D p)
        Creates a new instance of Ellipse, defined by P1D
        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.
        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.
        the center of the circle
      • getCurve

        public CubicCurve2D.Double getCurve()
        Report the Bezier curve which best approximates the circle arc.
        the Bezier curve
      • getDistance

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

        public Double getRadius()
        Report the circle radius.
        the circle radius
      • getStartAngle

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

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

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

        public void doc()
        Show online documentation.

SCaVis 2.2 © jWork.ORG