Capsule.to_vertices_and_faces

Capsule.to_vertices_and_faces(u=16, v=16, triangulated=False)[source]

Returns a list of vertices and faces.

Note that the vertex coordinates are defined with respect to the global coordinate system, and not to the local coordinate system of the capsule.

Parameters:
uint, optional

Number of faces in the ‘u’ direction.

vint, optional

Number of faces in the ‘v’ direction.

triangulated: bool, optional

If True, triangulate the faces.

Returns:
list[list[float]], list[list[int]]

A list of vertex locations, and a list of faces, with each face defined as a list of indices into the list of vertices.

Raises:
ValueError

If the value for u or v is smaller than 3.