Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotlib like plot_trisurf() #12

Open
amit112amit opened this issue Oct 4, 2019 · 2 comments
Open

Matplotlib like plot_trisurf() #12

amit112amit opened this issue Oct 4, 2019 · 2 comments

Comments

@amit112amit
Copy link

Hi.
matplotlib.mplot3d has a function plot_trisurf that can plot a 3D triangular mesh using vertex coordinates and triangle connectivity information. This is similar to gr3.createindexedmesh().

Is there any way to do this using the mlab interface? My use case is to make a figure with two subplots -- one a 2D line plot and another a 3D plot containing surface mesh of a closed shell.

Thanks

@danielkaiser
Copy link
Contributor

Hi,
is it mandatory for you to pass the connectivity information? If not you can try mlab.trisurf. It draws a triangular mesh similar to plot_trisurf using a delaunay triangulation to create the triangles from the vertices.

@danielkaiser danielkaiser transferred this issue from sciapp/gr Oct 7, 2019
@amit112amit
Copy link
Author

Yes. It is mandatory for me to pass the connectivity information because the structure is a closed polyhedron shell. It cannot be projected to any of the xy, yz or zx planes for generating delaunay triangulation. To identify the connectivity I have to project all the points to a sphere and find the convex hull of the spherical point cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants