pytransform3d.plot_utils.plot_capsule#

pytransform3d.plot_utils.plot_capsule(ax=None, A2B=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), height=1.0, radius=1.0, ax_s=1, wireframe=True, n_steps=20, alpha=1.0, color='k')[source]#

Plot capsule.

A capsule is the volume covered by a sphere moving along a line segment.

Parameters:
axMatplotlib 3d axis, optional (default: None)

If the axis is None, a new 3d axis will be created

A2Barray-like, shape (4, 4)

Frame of the capsule, located at the center of the line segment.

heightfloat, optional (default: 1)

Height of the capsule along its z-axis.

radiusfloat, optional (default: 1)

Radius of the capsule.

ax_sfloat, optional (default: 1)

Scaling of the new matplotlib 3d axis

wireframebool, optional (default: True)

Plot wireframe of capsule and surface otherwise

n_stepsint, optional (default: 20)

Number of discrete steps plotted in each dimension

alphafloat, optional (default: 1)

Alpha value of the mesh that will be plotted

colorstr, optional (default: black)

Color in which the capsule should be plotted

Returns:
axMatplotlib 3d axis

New or old axis

Examples using pytransform3d.plot_utils.plot_capsule#

Plot Random Geometries

Plot Random Geometries