Overview#

K3D-jupyter is a Jupyter Notebook 3D visualization package.

The primary aim of K3D-jupyter is to be an easy 3D visualization tool, designed with native interoperation with existing powerful libraries such as PyVista, without being strictly dependent on them.

K3D-jupyter plots ipywidgets assuring a perfect interaction of a browser-side widget with Python kernel by a proven and standardized protocol.

Brief Examples#

import k3d
import numpy as np
from k3d import matplotlib_color_maps

data = np.load('streamlines_data.npz')
plot = k3d.plot()
plot += k3d.line(data['lines'], width=0.00007, color_range=[0, 0.5], shader='mesh',
                 attribute=data['v'], color_map=matplotlib_color_maps.Inferno)

plot += k3d.mesh(data['vertices'], data['indices'],
                 opacity=0.25, wireframe=True, color=0x0002)
plot.display()
xx
yy
zz
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0370.037
yy
0.0420.042
0.0440.044
0.0460.046
0.0480.048
0.050.05
0.0520.052
0.0540.054
0.0560.056
zz
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
0.0370.037
yy
0.0450.045
0.0470.047
0.0490.049
0.0510.051
0.0530.053
0.0550.055
xx
K3D panel
Full screen
cameraAutoFit
gridAutoFit
gridVisible
fpsMeter
Mode
View
Camera
Trackball
FOV
voxelColor
lighting
colorLegend
vmin
vmax
opacity
radialSeg
shader
mesh
visible
width
color
flat_shading
opacity
visible
wireframe
Js version:
0.00.00.10.10.20.20.30.30.40.40.50.5

Advanced Examples#

_images/points_cloud.gif _images/streamlines.gif _images/vr.gif _images/tf_edit.gif

Offscreen rendering#

Click to open YouTube video.

https://i3.ytimg.com/vi/zCeQ_ZXy_Ps/maxresdefault.jpg https://i3.ytimg.com/vi/9evYSq3ieVs/maxresdefault.jpg https://i3.ytimg.com/vi/DbCiauTuJrU/maxresdefault.jpg https://i3.ytimg.com/vi/wIbBpUlB5vc/maxresdefault.jpg