# Generating an isosurface (mesh) out of a 3d array [SEC=UNCLASSIFIED]

Morning all!

I have some data (basically weather data) that I want to create some nice graphics (mainly PR type images) out of. My initial idea is to generate meshes from the data and import them into povray (ray tracing utility). Now matplotlib easily generates contours, is there a utility out there for generating meshes.

eg L=isosurface(X,Y,Z,V, level)

L: list/array of triangles where a triangle is len 3 list/array of len 3 tuples (x,y,z)

X: array or meshcube of the x oridnate

Y:…

Z:…

V: array/list where len(V.shape)=3

level: float, level of isosurface

I can kind of envisage a way it could be done by generating contours on constant Z slices of the cube and then searching for the closest vertices of the contour below it to make meshes…

I have played with MayaVI but have run into a few issues with it. (happy to receive recommendations of other 3D Vis environments compatible with Scipy/Numpy or that can read in NetCDF easily)

Cheers,

Scott

I’d still recommend Mayavi. I know that the mayavi developers would be very interested in hearing what issues exactly you’ve had. I’d suggest posting about them on the enthought-dev mailing list.

Ryan

···

On Thu, Aug 21, 2008 at 2:36 PM, Scott Collis <S.Collis@…2115…> wrote:

Morning all!

I have some data (basically weather data) that I want to create some nice graphics (mainly PR type images) out of. My initial idea is to generate meshes from the data and import them into povray (ray tracing utility). Now matplotlib easily generates contours, is there a utility out there for generating meshes.

eg L=isosurface(X,Y,Z,V, level)

L: list/array of triangles where a triangle is len 3 list/array of len 3 tuples (x,y,z)

X: array or meshcube of the x oridnate

Y:…

Z:…

V: array/list where len(V.shape)=3

level: float, level of isosurface

I can kind of envisage a way it could be done by generating contours on constant Z slices of the cube and then searching for the closest vertices of the contour below it to make meshes…

I have played with MayaVI but have run into a few issues with it. (happy to receive recommendations of other 3D Vis environments compatible with Scipy/Numpy or that can read in NetCDF easily)

Ryan May