Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

How to draw triangles on the Mesh3D surface in Python

I used alphahull to draw a Mesh3D object shown as below. Is there a way to draw the triangle meshes on the surface?

The part of drawing code is

go.Mesh3d(x=x,y=y,z=z,opacity=1.0, flatshading=True, intensity=z, colorscale = [[0, ‘rgb(255, 0, 0)’], [0.5, ‘rgb(0, 255, 0)’], [1, ‘rgb(0, 0, 255)’]], alphahull=1.35, showscale = True).


@xjh To plot triangles on your surface, you should triangulate it first.
In this notebook https://plot.ly/~empet/15091
is presented step by step how is triangulated a surface z=f(x,y)
via the Delaunay triangulation (scipy.spatial.Delaunay) of the planar region
where the function f is defined.

This a mesh3d plot associated to such a triangulation: