Table of Contents

Method ToPolygon

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

ToPolygon()

Approximates the circle as a polygon, cut finely enough that it strays no further from the circle than GeometryHelper.Internal.Tessellation.AutomaticChordRatio of its radius.

public GeoPolygon2 ToPolygon()

Returns

GeoPolygon2

A polygon inscribed in the circle, running the way the circle is parametrized.

Remarks

The vertices lie on the circle, so the polygon is inscribed and encloses slightly less than the circle does: about 0.26 % less at the fifty edges the automatic tolerance gives.

ToPolygon(int)

Approximates the circle as a polygon with a given number of edges.

public GeoPolygon2 ToPolygon(int segmentCount)

Parameters

segmentCount int

How many edges the polygon should have; at least three.

Returns

GeoPolygon2

A polygon inscribed in the circle.

Exceptions

ArgumentOutOfRangeException

Thrown when fewer than three edges are asked for.