Skip to content

Geom.cylinder()

Description

3D primitive (solid) -> cylinder, defined by radius r and height h and constructed relative to the point [0,0,0]. It is possible to build a sector of the cylinder using the parameter angle.

Syntax

JS
Geom.cylinder(r: Number, h: Number) -> Shape
Geom.cylinder(r: Number, h: Number, angle: Number) -> Shape

Parameters

Parameter Type Description
r Number Cylinder radius.
h Number Cylinder height.
angle Number Angle of the sector cylinder in degrees, the body is centered relative to axis OX.

Return value

Type Description
Shape Object type Shape, cylinder.

Example

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

See also

Last update: 14 August 2025, 18:47