Table of Contents

Method FromCircle

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

FromCircle(GeoCircle2)

Builds the spline that is exactly a circle: the rational quadratic of nine control points, four pieces of a quarter turn.

public static GeoSpline2 FromCircle(GeoCircle2 circle)

Parameters

circle GeoCircle2

The circle.

Returns

GeoSpline2

The spline, of degree 2 and rational, from the circle's point at angle nought round counter-clockwise, closed.

Remarks

A circle of radius 100 about the origin has the control points (100, 0), (100, 100), (0, 100), (-100, 100), (-100, 0), (-100, -100), (0, -100), (100, -100), (100, 0), the weights 1, 0.7071, 1, 0.7071, 1, 0.7071, 1, 0.7071, 1 and the knots 0, 0, 0, 1/4, 1/4, 1/2, 1/2, 3/4, 3/4, 1, 1, 1. Every point of the curve is at 100 from the origin to rounding, and its length is 2 pi times 100 to a relative 1E-12.

Exceptions

ArgumentException

Thrown when the centre has a coordinate that is not a finite number.