Table of Contents

Method Contains

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

Contains(GeoEllipse2, GeoLine2)

Checks whether an ellipse holds a segment whole, using the default tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoLine2 line)

Parameters

ellipse GeoEllipse2
line GeoLine2

Returns

bool

Contains(GeoEllipse2, GeoLine2, Tolerance)

Checks whether an ellipse holds a segment whole, within a tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoLine2 line, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

line GeoLine2

The segment.

tolerance Tolerance

The tolerance.

Returns

bool

true if both ends are contained, which for a region with no dent is the whole segment; otherwise, false.

Contains(GeoEllipse2, GeoCircle2)

Checks whether an ellipse holds a circle whole, using the default tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoCircle2 circle)

Parameters

ellipse GeoEllipse2
circle GeoCircle2

Returns

bool

Contains(GeoEllipse2, GeoCircle2, Tolerance)

Checks whether an ellipse holds a circle whole, within a tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoCircle2 circle, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

circle GeoCircle2

The circle.

tolerance Tolerance

The tolerance: the circle may reach past the rim by up to its point tolerance.

Returns

bool

true if the circle's centre lies inside, at least its radius less the point tolerance from the rim; otherwise, false. The ellipse 300 by 100 holds the circle of radius 100 about its centre, which touches it at the ends of the minor axis, and not one of radius 101.

Contains(GeoEllipse2, GeoEllipse2)

Checks whether an ellipse holds another whole, using the default tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoEllipse2 other)

Parameters

ellipse GeoEllipse2
other GeoEllipse2

Returns

bool

Contains(GeoEllipse2, GeoEllipse2, Tolerance)

Checks whether an ellipse holds another whole, within a tolerance.

public static bool Contains(GeoEllipse2 ellipse, GeoEllipse2 other, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The outer ellipse.

other GeoEllipse2

The inner ellipse.

tolerance Tolerance

The tolerance: the inner one may reach past the rim by up to its point tolerance.

Returns

bool

true if no point of the other's rim lies further outside than the point tolerance; otherwise, false. One touching the rim from inside is held, as a circle holds a circle touching it from inside.

Remarks

The other lies wholly inside when the first's equation along its rim is nowhere above nought, read exactly at the turning points. Otherwise the furthest it reaches out is found by Brent's method from 36 starts round its rim, as the distance between two ellipses is.

Contains(GeoEllipse2, GeoPoint2)

Checks whether an ellipse contains a point, using the default tolerance. A point on the rim is contained.

public static bool Contains(GeoEllipse2 ellipse, GeoPoint2 point)

Parameters

ellipse GeoEllipse2
point GeoPoint2

Returns

bool

Contains(GeoEllipse2, GeoPoint2, Tolerance)

Checks whether an ellipse contains a point, within a tolerance. A point on the rim, or outside it by no more than the point tolerance, is contained, as it is by a circle.

public static bool Contains(GeoEllipse2 ellipse, GeoPoint2 point, Tolerance tolerance)

Parameters

ellipse GeoEllipse2

The ellipse.

point GeoPoint2

The point.

tolerance Tolerance

The tolerance: how far from the rim, in drawing units, a point still lies on it.

Returns

bool

true if the point lies inside the ellipse or on its rim; otherwise, false.