Table of Contents

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 GeoPolygon2 ToPolygonBySpacing(double spacing)

Parameters

spacing double

The largest distance allowed between two vertices, measured along the circumference.

Returns

GeoPolygon2

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.