pygfx.geometries.cone_geometry

pygfx.geometries.cone_geometry(radius=1.0, height=1.0, radial_segments=8, height_segments=1, theta_start=0.0, theta_length=6.283185307179586, open_ended=False)

Generate a cone or a cone segment.

This function generates a cone or a cone segment. The cone’s axis runs along the local z-axis, and its midpoint is located at the local origin.

The function is a thin wrapper around pygfx.geometries.cylinder_geometry() with radius_top = 0.0 and slightly renamed arguments. For details, see the wrapped function.

Parameters:
  • radius (float) – The radius of the cone’s bottom face.

  • height (float) – The height of the cone.

  • radial_segments (int) – The number of segments to use when approximating the circle/arc.

  • height_segments (int) – The number of evenly spaced segments into which the mantle should be split.

  • theta_start (float) – The angle (in rad) at which to start the circle segment. Zero points into the direction of the local x-axis.

  • theta_length (float) – The arc’s central angle (in rad). Defaults to a full circle.

  • open_ended (bool) – If True, the cone’s faces are not added and the resulting geometry only contains the mantle.

Returns:

cylinder – A geometry object representing a cylinder. Mathematically, it consists of a set of open orientable manifolds.

Return type:

Geometry

See also

pygfx.cylinder_geometry