Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Plotting 3d figure in plotly using extreme values/surface constraints

Hi all,

I would like to create a 3d figure using plotly(/dash).

The figure is defined by a set of 3d constraints, which has a sort of patato like form (I uploaded an example of how it should look like). So I have ~40 constraints of the form:
ax + by + c*z <= Cte

I can calculate all the ‘extreme’ values (i.e. corner points) of the ‘patato’ and plot them using Scatter3d, but i cannot for the life of me get the exact thing i want.

Does anybody have an idea on how to tackle this issue? If you want i can provide data (and current code) if it can help. for the record, the example added uses the mpl_toolkits.mplot3d package in python.

@ndevocht Your 3d regions are convex, because they are defined by linear constraints. Hence each face is convex and can be triangulated as it is explained in this notebook: When the triangulation is done you can plot its triangles as Plotly Mesh3d instances.

1 Like