Method ToPolygon
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
ToPolygon()
Approximates the rim as a polygon, cut finely enough that it strays no further from the rim than GeometryHelper.Internal.Tessellation.AutomaticChordRatio of the minor radius.
public GeoPolygon3 ToPolygon()
Returns
- GeoPolygon3
A polygon inscribed in the ellipse, counter-clockwise about the normal from the end of the major axis, symmetric about both axes.
Remarks
The corners are those of ToPolygon(), put into the ellipse's plane: an ellipse 1 000 by 1 takes 84 edges, where an even step in the angle would need about 1 571.
ToPolygon(int)
Approximates the rim as a polygon with a given number of edges, its corners evenly spread in the eccentric angle.
public GeoPolygon3 ToPolygon(int segmentCount)
Parameters
segmentCountintHow many edges the polygon should have; at least three.
Returns
- GeoPolygon3
A polygon inscribed in the ellipse.
Exceptions
- ArgumentOutOfRangeException
Thrown when fewer than three edges are asked for.