Table of Contents

Method DistanceTo

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

DistanceTo(GeoEllipse3, GeoPoint3)

Calculates the shortest distance from the disc of an ellipse in space to a point.

public static double DistanceTo(GeoEllipse3 ellipse, GeoPoint3 point)

Parameters

ellipse GeoEllipse3

The ellipse.

point GeoPoint3

The point, anywhere.

Returns

double

The height of the point above the plane where its foot lies within the rim; otherwise the root of the height squared and the gap from the foot to the rim squared. A point 50 above the centre of an ellipse 300 by 100 is 50 from it; one 40 above the plane and 30 beyond the end of the major axis is 50 from it.

DistanceTo(GeoEllipse3, GeoPoint3, Tolerance)

Calculates the shortest distance from the disc of an ellipse in space to a point, within a tolerance.

public static double DistanceTo(GeoEllipse3 ellipse, GeoPoint3 point, Tolerance tolerance)

Parameters

ellipse GeoEllipse3

The ellipse.

point GeoPoint3

The point, anywhere.

tolerance Tolerance

The tolerance, taken as a circle's is; it changes nothing, as for GetClosestPointOnSurface(GeoEllipse3, GeoPoint3, Tolerance).

Returns

double

The height above the plane where the foot lies within the rim; otherwise the gap to the nearest point of the rim.