Skip to content

Geom.ngon()

Description

2D Regular N-gon, constructed in the XOY plane, with the center of the figure at (0,0,0).

Syntax

JS
Geom.ngon(radius: Number, n: Number) -> Shape

Parameters

Parameter Type Mandatory Description
radius Number ✅ Radius of the N-gon (distance from center to vertices).
n Number ✅ Number of angles in the N-gon (allowed values: 3 and more).

Return value

Type Description
Shape Object of type Shape, regular N-gon.

Example

JS
let s = Geom.ngon(100, 6)
console.info(s)

See also

Last update: 15 August 2025, 14:32