pytransform3d.visualizer.Sphere

class pytransform3d.visualizer.Sphere(radius=1.0, A2B=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), resolution=20, c=None)[source]

Bases: Artist

Sphere.

Parameters:
radiusfloat, optional (default: 1)

Radius of the sphere

A2Barray-like, shape (4, 4)

Center of the sphere

resolutionint, optional (default: 20)

The resolution of the sphere. The longitudes will be split into resolution segments (i.e. there are resolution + 1 latitude lines including the north and south pole). The latitudes will be split into 2 * resolution segments (i.e. there are 2 * resolution longitude lines.)

carray-like, shape (3,), optional (default: None)

Color

__init__(radius=1.0, A2B=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), resolution=20, c=None)[source]

Methods

__init__([radius, A2B, resolution, c])

add_artist(figure)

Add artist to figure.

set_data(A2B)

Update data.

Attributes

geometries

Expose geometries.

set_data(A2B)[source]

Update data.

Parameters:
A2Barray-like, shape (4, 4)

Center of the sphere.

property geometries

Expose geometries.

Returns:
geometrieslist

List of geometries that can be added to the visualizer.

add_artist(figure)

Add artist to figure.

Parameters:
figureFigure

Figure to which the artist will be added.

Examples using pytransform3d.visualizer.Sphere

Add and Remove Artist

Add and Remove Artist

Add and Remove Artist