astEllipseParsastEllipsePars
-
Returns the geometric parameters of an Ellipse
- Description:
- This function
returns the geometric parameters describing the supplied ellipse.
- Synopsis:
- void astEllipsePars( AstEllipse
this, double centre[2], double
a,
double
b, double
angle, double p1[2], double p2[2] )
- Parameters:
-
this
-
Pointer to the RegionRegion.
-
centre
-
The coordinates of the EllipseEllipse centre are returned in this arrays.
-
a
-
Returned holding the half-length of the first axis of the
ellipse.
-
b
-
Returned holding the half-length of the second axis of the
ellipse.
-
angle
-
If the coordinate system in which the Ellipse is defined has
axes (X,Y), then
"
angle"
is returned holding the angle from the positive direction of
the Y axis to the first axis of the ellipse, in radians.
Positive rotation is in the same sense as rotation from the
positive direction of Y to the positive direction of X.
-
p1
-
An array in which to return the coordinates at one of the two ends
of the first axis of the ellipse.
A NULL pointer can be supplied if these coordinates are not needed.
-
p2
-
An array in which to return the coordinates at one of the two ends
of the second axis of the ellipse.
A NULL pointer can be supplied if these coordinates are not needed.
- Notes:
- If the coordinate system represented by the Ellipse has been
changed since it was first created, the returned parameters refer
to the new (changed) coordinate system, rather than the original
coordinate system. Note however that if the transformation from
original to new coordinate system is non-linear, the shape
represented by the supplied Ellipse object may not be an accurate
ellipse.
- Values of AST__BAD are returned for the parameters without error
if the ellipse is degenerate or undefined.