Lines#
- class vivid3d.Lines#
Bases:
vivid3d._core.BaseMesh
Lines class that holds 3d lines
Useful for plotting vector fields or trajectories.
- label#
Optional name of the object, not required to be unique.
- Type
str
- n_polygons#
# of vertices
- Type
number
- n_vertices#
# of vertices
- Type
number
- material#
The material instance used by 3D renderers
- Type
- colormap#
The Colormap instance used to map scalar data to colors. See https://matplotlib.org/stable/gallery/color/colormap_reference for list of all supported colormaps.
- Type
matplotlib.colors.ColorMap, default: “plasma”
- opacity#
Float in the range of 0.0 - 1.0 indicating how transparent the material is. A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
- Type
number
- add_line(self: vivid3d._core.Lines, line: Point3DList) None #
Add another line
- export(self: vivid3d._core.BaseMesh, output_file: str = 'Vivid3dModel', file_type: str = 'glb') None #
Exports Mesh to output_file with given file_type format. For full list of supported file formats, see: https://vivid.readthedocs.io/en/latest/userguide/basics.html#supported-file-types
- Parameters
output_file (str, default: "Vivid3dModel") – File Directory to export to
file_type (str, default: 'glb') – File format to export to
- export_to_blob(self: vivid3d._core.BaseMesh, file_type: str = 'glb') vivid3d._core.BlobData #
Exports Mesh to Blob with given file_type format. For full list of supported file formats, see: https://vivid.readthedocs.io/en/latest/userguide/basics.html#supported-file-types
- Parameters
file_type (str, default: 'glb') – File format to export to
- Returns
blob (vivid3d.BlobData) – Object containing exported model file blobs
- move(self: vivid3d._core.BaseMesh, direction: Point3D) None #
Moves Mesh in X,Y,Z by direction(X,Y,Z)
- Parameters
direction (Point3D) – The vector to move by
- rotate(self: vivid3d._core.BaseMesh, norm_vec: Point3D, radians_angle: float) None #
Rotate the Mesh points around a normal vector by an angle in radians
- Parameters
norm_vec (Point3D (normalized)) – Unit vector from (0,0,0) of the BaseMesh
radians_angle (float) – The angle to rotate in radians
- scale(self: vivid3d._core.BaseMesh, scale: Point3D) None #
Scales Mesh in X,Y,Z by scale(X,Y,Z)
- Parameters
scale (Point3D) – The vector to scale by
- set_color(self: vivid3d._core.BaseMesh, color: str) None #
Set the mesh texture to a single color.
- Parameters
color (str) – See https://htmlcolorcodes.com/color-names/ for list of all available colors.
- show(self: vivid3d._core.BaseMesh, height: int = 600) object #
Render and view the mesh in a viewer window.
- Parameters
height (int, default: 600) – height in pixels to open the viewer
- Returns
html (str or IPython.display.HTML) – The html with embedded model.
- transform(self: vivid3d._core.BaseMesh, matrix: List[Point3D[3]]) None #
Transform Mesh by transformation matrix