In Matlab I did something similar using the delaunay
function on the x
, y
coords only (not the z
), then plotting with trimesh
or trisurf
, using z
as the height.
SciPy has the Delaunay class, which is based on the same underlying QHull library that the Matlab's delaunay
function is, so you should get identical results.
From there, it should be a few lines of code to convert this Plotting 3D Polygons in python-matplotlib example into what you wish to achieve, as Delaunay
gives you the specification of each triangular polygon.