|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthhreco.fragmentation.Basis
hhreco.fragmentation.EllipseBasis
An EllipseBasis uses an ellipse to approximate a set of points. It is represented with (a,b,c,d,e,f) parameters as in a conic equation: ax^2+bxy+cy^2+dx+ey+f=0. Many properties of the fitted ellipse have been calculated, however to minimize the amount of computation, they can be turned off by not calling calcProperties.
Field Summary |
Fields inherited from class hhreco.fragmentation.Basis |
TYPE_ELLIPSE, TYPE_LINE |
Constructor Summary | |
EllipseBasis(double[] xvals,
double[] yvals,
int num,
double[] params)
Create an ellipse basis where params give the parameters of an ellipse that best approximate the given set of points. |
Method Summary | |
int |
genPoints(java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2,
double[] xpath,
double[] ypath,
int npts)
Generate points from p1 to p2 in the direction of the stroke. |
java.awt.geom.Point2D |
getCenter()
Return the center of the ellipse |
double |
getCircumference()
Return the approximated circumference of this ellipse (the entier ellipse, not just the segment) |
double |
getEccentricity()
Return the ratio of the norms of the two axes of the ellipse |
double[][] |
getEllipticalPoints()
Return the data points of the elliptical segment that approximates the given set of points. |
java.awt.geom.Line2D |
getMajorAxis()
|
double |
getMaxNorm()
Return the magnitude of the major axis. |
java.awt.geom.Point2D |
getMidpoint()
Return the mid point on the original stroke points |
double |
getMinNorm()
Return the magnitude of the minor axis. |
java.awt.geom.Line2D |
getMinorAxis()
|
int |
getNumEllipticalDataPoints()
Return the number of data points used to represent the elliptical segment. |
Methods inherited from class hhreco.fragmentation.Basis |
getFitError, getNumPoints, getParams, getType, getXvals, getYvals, setFitError, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EllipseBasis(double[] xvals, double[] yvals, int num, double[] params)
Method Detail |
public int genPoints(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2, double[] xpath, double[] ypath, int npts)
public java.awt.geom.Point2D getCenter()
public java.awt.geom.Point2D getMidpoint()
public double getCircumference()
public double getEccentricity()
public double[][] getEllipticalPoints()
public java.awt.geom.Line2D getMajorAxis()
public java.awt.geom.Line2D getMinorAxis()
public double getMaxNorm()
public double getMinNorm()
public int getNumEllipticalDataPoints()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |