Terrain#

import numpy as np
import k3d
from pyvista import examples

dem = examples.download_crater_topo()
data = dem.get_array(0).reshape(dem.dimensions[::-1])[0, :, :].astype(np.float32)

plot = k3d.plot()

obj = k3d.surface(data,
            attribute=data,
            flat_shading=False,
            color_map = k3d.colormaps.matplotlib_color_maps.viridis,
            xmin=dem.bounds[0],
            xmax=dem.bounds[1],
            ymin=dem.bounds[2],
            ymax=dem.bounds[3])

plot += obj
plot.display()
xx
yy
zz
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
15001500
zz
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
15001500
zz
18200001820000
xx
56420005642000
56440005644000
56460005646000
56480005648000
56500005650000
56520005652000
56540005654000
56560005656000
yy
18200001820000
xx
K3D panel
Full screen
cameraAutoFit
gridAutoFit
gridVisible
fpsMeter
Mode
View
Camera
Trackball
FOV
voxelColor
lighting
color
colorLegend
vmin
vmax
flat_shading
opacity
visible
wireframe
Js version:
7507501000100012501250150015001750175020002000225022502500250027502750