Skip to content

Geom.ellipse()

Description

A 2D ellipse or sector of the ellipse is constructed in the XOY plane, with angles specified in degrees, and the center of the figure at (0,0,0).

Syntax

JS
Geom.ellipse(majorRadius: Number, minorRadius: Number) -> Shape
Geom.ellipse(majorRadius: Number, minorRadius: Number, angle1: Number, angle2: Number) -> Shape

Parameters

Parameter Type Description
majorRadius Number The first radius of the ellipse.
minorRadius Number The second radius of the ellipse.
angle1 Number The starting angle of the sector of the ellipse in degrees within (0°, 360°).
angle2 Number The ending angle of the sector of the ellipse in degrees within (0°, 360°).

Note

When setting parameters for constructing an ellipse, the value of majorRadius (length of the major semi-axis) must be greater than or equal to the value of minorRadius (length of the minor semi-axis).

Return value

Type Description
Shape An object of type Shape, an ellipse or sector of the ellipse.

Example

JS
1
2
3
4
let s1 = Geom.ellipse(100, 200);
console.info(s1); // output:
let s2 = Geom.ellipse(100, 200, 0, 90);
console.info(s2); // output:

See also

Last update: 15 August 2025, 14:32