Circle

A Circle is a set of all points in a plane that are at a given distance from a given point, the center.

Constructor

new Circle(center, radius)

Creates a new Circle from a center Point2D and a radius.

Parameters:
NameTypeDescription
centerPoint2D

The center point of the circle as a Point2D.

radiusnumber

The radius of the circle.

Classes

Circle

Members

arc

Creates an Arc from the circle.

center

Returns the center point of the circle as a Point2D.

radius

Returns the radius of the circle.

Methods

area() → {number}

Returns the area of the circle.

Returns:

The area of the circle.

Type: 
number

circumference() → {number}

Returns the circumference of the circle.

Returns:

The circumference of the circle.

Type: 
number

vector_object_builder(samplesopt) → {VectorObjectBuilder}

Creates a new VectorObjectBuilder from the circle.

Parameters:
NameTypeAttributesDescription
samplesnumber | null<optional>

The number of samples to use to create the circle, by default 15.

Returns:

A VectorObjectBuilder representing the circle.

Type: 
VectorObjectBuilder