Table of Contents

Method GetAngleAtPoint

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

GetAngleAtPoint(GeoEllipse2, GeoPoint2)

Gets the eccentric angle of the point of the rim of an ellipse nearest a point.

public static double GetAngleAtPoint(GeoEllipse2 ellipse, GeoPoint2 point)

Parameters

ellipse GeoEllipse2

The ellipse.

point GeoPoint2

The point; it does not have to lie on the rim.

Returns

double

The eccentric angle t of the nearest point of the rim, in radians from nought up to a full turn, counter-clockwise from the end of the major axis; not the direction seen from the centre. On an ellipse 300 by 100 the point (212.1, 70.7) gives 45°, though it lies 18.4° from the axis seen from the centre.

Remarks

The nearest point is the one GetClosestPointOnBoundary(GeoEllipse2, GeoPoint2) gives, so the centre gives a quarter turn, the end of the minor axis on its positive side, a circle's centre too; and a point on the major axis inside, which two points of the rim are equally near, gives the one on the positive side of it.