Skip to content

Geom.circle()

Description

A 2D circle or sector of a circle is constructed in the XOY plane, angles are specified in degrees, and the center figure is at the point [0,0,0].

Syntax

JS
Geom.circle(radius: Number) -> Shape
Geom.circle(radius: Number, angle: Number) -> Shape
Geom.circle(radius: Number, angle1: Number, angle2: Number) -> Shape

Parameters

Parameter Type Description
radius Number The radius of the circle.
angle Number The angle of the sector of a circle in degrees in the range (0°, 360°), the body is centered relative to the axis OX.
angle1 Number The starting angle of the sector of a circle in degrees in the range (0°, 360°).
angle2 Number The ending angle of the sector of a circle in degrees in the range (0°, 360°).

Return value

Type Description
Shape An object of type Shape, a circle or sector of a circle.

Example

JS
1
2
3
4
5
6
let s1 = Geom.circle(100);
console.info(s1); // output:
let s2 = Geom.circle(100, 30);
console.info(s2); // output:
let s3 = Geom.circle(100, 0, 90);
console.info(s3); // output:

See Also

Last update: 14 August 2025, 18:47