Basics of vedo#
from vedo import *
settings.default_backend = "vtk" # or k3d, ipyvtk, trame, or 2d
# Show an empty window (press q to close it)
plt = Plotter()
plt.show()
plt.close()
sphere = Sphere().linewidth(1)
sphere
Sphere:   vedo.mesh.Mesh
|
plt = Plotter()
plt += sphere
plt.show()
plt.close()
# We can add multiple objects:
plt = Plotter()
# Add a sphere
sphere = Sphere(r=1.5).c("red", 0.2)
# Add a box
box = Box(pos=(1, 0, 0)).triangulate().c("green", 0.2)
# We can get its intersection
intersection = sphere.intersect_with(box).linewidth(4).c("black")
plt += sphere
plt += box
plt += intersection
plt.show()
plt.close()