Surface

In [ ]:
import k3d
import numpy as np

Nx = 30
Ny = 60
xmin, xmax = -3, 3
ymin, ymax = -0, 3

x = np.linspace(xmin, xmax, Nx)
y = np.linspace(ymin, ymax, Ny)
x, y = np.meshgrid(x, y)

heights = np.sin(x**2 + y**2)

plot = k3d.plot()
plot += k3d.surface(heights.astype(np.float32), xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax)
plot.display()
In [ ]:
plot.objects[0].flat_shading = False
In [ ]: