ipyvolume icon indicating copy to clipboard operation
ipyvolume copied to clipboard

plot_trisurf triangles default value

Open martinRenou opened this issue 4 years ago • 1 comments

Using plot_trisurf you apparently need to provide triangle indices for it to display something. Maybe it would make sense to set a default value to something like: np.arange(n_triangles * 3).reshape((n_triangles, 3)).

Better than that, instead of setting a default value Python side, it would be way more optimized to let it to None and use this default triangle indices value JavaScript side if triangle is null.

martinRenou avatar Feb 28 '20 15:02 martinRenou

Actually it is the default ThreeJS behavior to use contiguous points for creating triangles automatically: https://threejs.org/docs/index.html#api/en/core/BufferGeometry.index, is there anything in the ipyvolume code that prevent this default from happening?

martinRenou avatar Feb 28 '20 17:02 martinRenou