pytransform3d.visualizer.Plane#
- class pytransform3d.visualizer.Plane(normal=array([0., 0., 1.]), d=None, point_in_plane=None, s=1.0, c=None)[source]#
Bases:
Artist
Plane.
The plane will be defined either by a normal and a point in the plane or by the Hesse normal form, which only needs a normal and the distance to the origin from which we can compute the point in the plane as d * normal.
A plane will be visualized by a square.
- Parameters:
- normalarray-like, shape (3,), optional (default: [0, 0, 1])
Plane normal.
- dfloat, optional (default: None)
Distance to origin in Hesse normal form.
- point_in_planearray-like, shape (3,), optional (default: None)
Point in plane.
- sfloat, optional (default: 1)
Scaling of the plane that will be drawn.
- carray-like, shape (3,), optional (default: None)
Color.
Methods
__init__
([normal, d, point_in_plane, s, c])add_artist
(figure)Add artist to figure.
set_data
(normal[, d, point_in_plane, s, c])Update data.
Attributes
Expose geometries.
- set_data(normal, d=None, point_in_plane=None, s=None, c=None)[source]#
Update data.
- Parameters:
- normalarray-like, shape (3,)
Plane normal.
- dfloat, optional (default: None)
Distance to origin in Hesse normal form.
- point_in_planearray-like, shape (3,), optional (default: None)
Point in plane.
- sfloat, optional (default: 1)
Scaling of the plane that will be drawn.
- carray-like, shape (3,), optional (default: None)
Color.
- Raises:
- ValueError
If neither ‘d’ nor ‘point_in_plane’ is defined.
- 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.