Package inra.ijpb.geometry
Class Ellipse
java.lang.Object
inra.ijpb.geometry.Ellipse
public class Ellipse
extends java.lang.Object
Represents a 2D ellipse.
- Author:
- dlegland
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Ellipse
public Ellipse(java.awt.geom.Point2D center, double radius1, double radius2, double theta)Creates a new ellipse.- Parameters:
center
- the center of the ellipseradius1
- the length of the major semi-axisradius2
- the length of the minor semi-axistheta
- the orientation of the ellipse, in degrees
-
Ellipse
public Ellipse(double xc, double yc, double radius1, double radius2, double theta)Creates a new ellipse.- Parameters:
xc
- the x-coordinate of the center of the ellipseyc
- the y-coordinate of the center of the ellipseradius1
- the length of the major semi-axisradius2
- the length of the minor semi-axistheta
- the orientation of the ellipse, in degrees
-
-
Method Details
-
centers
Initializes center array from ellipse array.- Parameters:
ellipses
- an array of ellipses- Returns:
- the array of points corresponding to the centers of the ellipses.
-
area
public double area()- Returns:
- the area of the domain enclosed by this ellipse
-
center
public java.awt.geom.Point2D center()- Returns:
- the center of this ellipse
-
radius1
public double radius1()- Returns:
- the length of the major semi-axis
-
radius2
public double radius2()- Returns:
- the length of the minor semi-axis
-
orientation
public double orientation()- Returns:
- the orientation of the ellipse, in degrees
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-