Method ToPolygon
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ToPolygon(GeoEllipse2, int)
Approximates the rim of an ellipse as a polygon with a given number of edges, its corners evenly spread in the eccentric angle.
public static GeoPolygon2 ToPolygon(GeoEllipse2 ellipse, int segmentCount)
Parameters
ellipseGeoEllipse2The ellipse.
segmentCountintHow many edges; at least three.
Returns
- GeoPolygon2
A polygon inscribed in the ellipse, its corners at the parameters 0, 1/n, 2/n and so on.
Exceptions
- ArgumentOutOfRangeException
Thrown when fewer than three edges are asked for.