LightForm-group / formable

Formability analysis in Python
Mozilla Public License 2.0
2 stars 1 forks source link

Improve performance when plotting multiple yield functions #9

Open aplowman opened 4 years ago

aplowman commented 4 years ago

Currently, we're using a contour plot as a "hack" to show the yield surface; for a given yield surface we just plot one contour (at value zero). I think when showing multiple yield surfaces together this can result in unresponsiveness.

Perhaps a better approach is to compute the contours ourselves, using skimage.measure.find_contours (example). Then we can add as many yield surfaces as we like as simple line plots.

This is in reference to the 2D plotting, which is more important the the 3D plotting.

For 3D plotting, I guess a similar approach could be used; instead of using the Plotly isosurface type with surface_count=1, we could use in principle a mesh3d type and specify the surface coordinates themselves. I am not sure whether that would improve performance. We would need to use the marching cubes function from scikit-image.