cds.astro
Class EllipticalRegion

java.lang.Object
  extended by cds.astro.AbstractRegion
      extended by cds.astro.Region
          extended by cds.astro.EllipticalRegion
All Implemented Interfaces:
java.io.Serializable

public class EllipticalRegion
extends Region

Elliptical region on the sky, defined by its center + semi-major axes. The spherical ellipse is defined as the set of points having the sum of their distances to 2 foci F0 and F1 constant; the relation between a (semi-major axis), b (semi-minor axis) and c (semi-distance between foci) is cosa = cosb . cosc. The equation of the spherical ellipse is, if f0 and f1 are the distance to the foci: cos2(f0) + cos2(f1) - 2 cos(2a) cos(f0) cos(f1) = sin2(2a) which is a quadratic expression in x, y, z.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cds.astro.AbstractRegion
centroid, DISJOINT, INCLUDES, INTERSECTS, IS_PARTOF, maxrad, minrad
 
Method Summary
 double area()
          Area of an elliptical region.
 int checkCircle(Coo point, double r)
          Verify a circle intersects an Ellipse
 boolean checkCoo(Coo point)
          Verify point within Ellipse
 int checkQbox(int qbox)
          Intersection of a Qbox with the Ellipse
 java.lang.String toString()
          Edition of an Ellipse region
 
Methods inherited from class cds.astro.Region
box, circle, ellipse, ellipse, polygon, rotatedBox, zone, zone
 
Methods inherited from class cds.astro.AbstractRegion
check1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Edition of an Ellipse region

Overrides:
toString in class Region
Returns:
ascii equivalent

area

public double area()
Area of an elliptical region.

Overrides:
area in class Region
Returns:
area. The area is (in steradians) 2\pi - 4.*cos(a)*I(cos(c))) where I(k) is the complete elliptical integral of 1st kind I(k) = \int(0,pi/2) du/sqrt(cos^2(u) + k^2.sin^2(u))

checkCoo

public boolean checkCoo(Coo point)
Verify point within Ellipse

Overrides:
checkCoo in class Region
Parameters:
point - a position
Returns:
true if point within region.

checkCircle

public int checkCircle(Coo point,
                       double r)
Verify a circle intersects an Ellipse

Overrides:
checkCircle in class Region
Parameters:
point - a position
r - radius (degrees)
Returns:
DISJOINT / INTERSECTS / INCLUDES. for no intersection / overlap / cercle fully included

checkQbox

public int checkQbox(int qbox)
Intersection of a Qbox with the Ellipse

Overrides:
checkQbox in class AbstractRegion
Parameters:
qbox - the Qbox to check
Returns:
DISJOINT / INCLUDES / INTERSECTS