Gallery Tutorial Documentation Download  GitHub EMBL
Fork me on GitHub

A python module for scientific analysis and visualization of эd objects


Download & Install

pip install

Quick Start

To visualize a file from a web URL (or from your Dropbox!), simply type in your terminal:

pip install vedo

To visualize a full 3D interactive scene, type:


Let's create an interactive 3D scene with a simple cone, in 3 lines of python code:

from vedo import Cone

# Create a simple cone
c = Cone()

# Show it (with axes)

# Now you can interact with the 3D scene,
# press "h" to explore the possibilities! 

Let's write a simple python script that loads a polygonal Mesh and generates a cool rendering by adding some custom light sources to the scene:

from vedo import *

# Load a polygonal mesh, make it white and glossy:
man = Mesh('')

# Create two points:
p1 = Point([ 1,0,1], c='yellow')
p2 = Point([-1,0,2], c='red')

# Add colored light sources at the point positions:
l1 = Light(p1, c='yellow')
l2 = Light(p2, c='red')

# Show everything in one go:
show(man, l1, l2, p1, p2, "Hello World", axes=True)

Let's create a Volume - a volumetric dataset - from a numpy object:

import numpy as np
from vedo import *

# Create a scalar field: the distance from point (15,15,15)
X, Y, Z = np.mgrid[:30, :30, :30]
scalar_field = ((X-15)**2 + (Y-15)**2 + (Z-15)**2)/225

# Create the Volume from the numpy object
vol = Volume(scalar_field)

# Generate the surface that contains all voxels in range [1,2]
lego = vol.legosurface(1,2).addScalarBar()

show(lego, axes=True)

Draw 3D scatter plot plot of oriented wind speed directions:

import numpy as np
import pandas as pd
from vedo import Cone, Glyph, show

# Read cvs data
df = pd.read_csv("")
pts = np.c_[df['x'], df['y'], df['z']]
vecs= np.c_[df['u'], df['v'], df['w']]

# Create a mesh to be used like a symbol (a "glyph") to be attached to each point
cone = Cone().scale(0.3).rotateY(90)  # make it smaller and orient tip to positive x

glyph = Glyph(pts, cone, vecs, scaleByVectorSize=True, colorByVectorSize=True)
glyph.cmap('Blues').addScalarBar(title='wind speed').show(axes=True)


Scientific publications leveraging vedo: Presentations at international conferences: You can cite vedo as: