Skip to content

Geom.cone()

Description

3D primitive (volume) -> cone, defined by the lower radius r1, upper radius r2 and height h and built relative to point [0,0,0]. It is possible to build a sector of the cone using the parameter angle.

Syntax

JS
Geom.cone(r1: Number, r2: Number, h: Number) -> Shape
Geom.cone(r1: Number, r2: Number, h: Number, angle: Number) -> Shape

Parameters

Parameter Type Description
r1 Number Lower radius of the cone.
r2 Number Upper radius of the cone.
h Number Height of the cone.
angle Number Angle of the sector of the cone in degrees, the body is centered relative to axis OX.

Return value

Type Description
Shape Object of type Shape, a cone.

Example

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

See also

Last update: 14 August 2025, 18:47