Table of Contents

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 GeoPolygon2 ToPolygon()

Returns

GeoPolygon2

A polygon inscribed in the ellipse, counter-clockwise from the end of the major axis, symmetric about both axes.

Remarks

The corners are spaced by how sharply the rim bends: an ellipse 1 000 by 1 takes 84 edges, where an even step in the angle would need about 1 571; a circle takes the fifty or so ToPolygon() does, made a multiple of four.

ToPolygon(int)

Approximates the rim as a polygon with a given number of edges, its corners evenly spread in the eccentric angle.

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 ellipse.

Exceptions

ArgumentOutOfRangeException

Thrown when fewer than three edges are asked for.