from k3d import K3D
import numpy
width = height = length = 30
X, Y, Z = numpy.mgrid[:width, :height, :length]
scalars_field = ((X-15.0)/15.0)**2 + ((Y-15.0)/15.0)**2 + ((Z-15.0)/15.0)**2
plot = K3D(background_color=0x000000)
plot += K3D.marching_cubes(scalars_field, width, height, length, isolation=0.8)
plot.display()