pytransform3d.visualizer.Vector3D#

class pytransform3d.visualizer.Vector3D(start=array([0., 0., 0.]), direction=array([1, 0, 0]), c=(0, 0, 0))[source]#

Bases: Artist

A vector.

Parameters:
startarray-like, shape (3,), optional (default: [0, 0, 0])

Start of the vector

directionarray-like, shape (3,), optional (default: [1, 0, 0])

Direction of the vector

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

A color is represented by 3 values between 0 and 1 indicate representing red, green, and blue respectively.

__init__(start=array([0., 0., 0.]), direction=array([1, 0, 0]), c=(0, 0, 0))[source]#

Methods

__init__([start, direction, c])

add_artist(figure)

Add artist to figure.

set_data(start, direction[, c])

Update data.

Attributes

geometries

Expose geometries.

set_data(start, direction, c=None)[source]#

Update data.

Parameters:
startarray-like, shape (3,)

Start of the vector

directionarray-like, shape (3,)

Direction of the vector

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

A color is represented by 3 values between 0 and 1 indicate representing red, green, and blue respectively.

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.