简体   繁体   中英

Python : How to project a 3D unstructured mesh to 2D?

From an unstructured mesh ( X,Y,Z + connectivity ), I wish to create a 2D array corresponding to Z projection (top-view) on plane( X,Y ). At this end, I have used plot_trisurf from matplotlib (for 3D representation .. and it works) and then I have tried to use contourf( X, Y, Z, zdir='z' ) to realize the projection. Unfortunately this last function seems to be only dedicated for structured mesh.

Is there a way to obtain (easily, with existing libraries) what I am looking for?

You can use tricontour . You can find some examples in the documentation. This is an example that they present there:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM