public class FitCircle2D extends Object
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 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(Point2D left,
Point2D middle,
Point2D right,
double[] x,
double[] y)
Creates a new instance of Circle, fitted to 3 defining points.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doc()
Show online documentation.
|
Point2D.Double |
getCenter()
Report the circle center.
|
Circle |
getCircle()
Return fitted circle.
|
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.
|
Double |
getRadius()
Report the circle radius.
|
Double |
getStartAngle()
Report the angle at start of the circle arc.
|
Double |
getStopAngle()
Report the angle at stop of the circle arc.
|
String |
toString() |
public FitCircle2D(double[] x,
double[] y)
x - array of abscissaey - array of ordinatespublic FitCircle2D(P1D p)
P1D - inputpublic FitCircle2D(Point2D left, Point2D middle, Point2D right, double[] x, double[] y)
left - left defining pointmiddle - middle defining pointright - right defining pointx - array of abscissae (including the defining points)y - array of ordinates (including the defining points)public Point2D.Double getCenter()
public CubicCurve2D.Double getCurve()
public double getDistance()
public Double getRadius()
public Double getStartAngle()
public Double getStopAngle()
public Circle getCircle()
public void doc()
SCaVis 1.7 ©