hPatch = swplot.polyhedron(vertices)

hPatch = swplot.polyhedron(handle, ...)


hPatch = swplot.polyhedron(vertices) creates convex polyhedra or polygon from a given vertex list (unordered list of 3D coordinates). To draw the polyhedron the convex hull of the given point cloud is calculated using convhulln. It is automatically detected if the given vertex points lie on a plane in which case the convex polygon is drawn.

hPatch = swplot.polyhedron(handle, ...) adds the generated patch object to a given axis if handle is an axis handle or adds the polyhedron to an existing patch object, if the given handle points to a patch object.

Input Arguments

Matrix with dimensions of , where is the number of polyhedra to draw, is the number of vertices per polyhedron.

See Also