Method FromThreePoints
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
FromThreePoints(GeoPoint3, GeoPoint3, GeoPoint3)
Creates the arc through three points in space, using the default tolerance.
public static GeoArc3 FromThreePoints(GeoPoint3 start, GeoPoint3 middle, GeoPoint3 end)
Parameters
Returns
FromThreePoints(GeoPoint3, GeoPoint3, GeoPoint3, Tolerance)
Creates the arc through three points in space, within a tolerance.
public static GeoArc3 FromThreePoints(GeoPoint3 start, GeoPoint3 middle, GeoPoint3 end, Tolerance tolerance)
Parameters
startGeoPoint3Where the arc starts.
middleGeoPoint3A point the arc passes through between its ends.
endGeoPoint3Where the arc ends.
toleranceToleranceThe tolerance.
Returns
- GeoArc3
The arc from the start through the middle to the end, in the plane the three points share.
Remarks
Three points that do not share a line settle the plane as well as the arc, so nothing else has to be given. The work is done in that plane by FromThreePoints(GeoPoint2, GeoPoint2, GeoPoint2, Tolerance), and the points share a line by the same rule: where the middle one lies within the point tolerance of the line through the other two, or the triangle they make has twice an area of no more than the square of the point tolerance. The points (0, 0, 0), (100, 0.01, 0) and (200, 0, 0), the middle 0.01 off the chord, have the arc of radius 500 000 through them at a tolerance of a thousandth, and share a line at 0.05. An arc that would miss one of its three points by more than the tolerance, its radius past the reach of the digits, is refused too.
Exceptions
- InvalidOperationException
Thrown when the three points share a line, so no circle passes through them, or so nearly that the arc through them would miss them.
- ArgumentException
Thrown when a point is not a finite one.