Method ToPolygonBySpacing
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
ToPolygonBySpacing(double)
Approximates the circle as a polygon whose vertices are no further apart than a spacing.
public GeoPolygon3 ToPolygonBySpacing(double spacing)
Parameters
spacingdoubleThe largest distance allowed between two vertices, measured along the circumference.
Returns
- GeoPolygon3
A polygon inscribed in the circle, its vertices evenly spread.
Remarks
The circumference rarely divides by the spacing exactly, so the spacing is a limit rather than a step: the vertices are spread evenly and no two are further apart than asked, which leaves no short edge at the end.
Exceptions
- ArgumentOutOfRangeException
Thrown when the spacing is not a positive number.