Mayavi, unstructured grid etc.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Mayavi, unstructured grid etc.

Brennan Williams
Some unstructured questions about unstructured grids....

I have an existing app using Traits,Chaco etc.  I have unstructured
grid(s), hexahedral cells with 8 corner points, 6 faces in an nx,ny,nz
grid where each cell may or may not be connected to the adjacent cell
(distorted voxels is I think what Andrea Gavana called them).
I'm aiming to move this functionality from an existing 3D viz app,
replacing it with tvtk,Mayavi embedded in a Traits dialog.

So where do I start? Should I first write a filter to convert the
proprietary grid file format into a VTK XML file? Or should I write
something that creates an unstructured grid (as in the
unstructured_grid.py example)? Forgetting about 3d performance for now,
I'm sure I'll run into issues with importing a proprietary grid file
using Python when I have anywhere from 20,000 cells at the low end to 5
million+ cells at the high end.

I also see that Mayavi has a Chaco File interface - I had been thinking
about using Chaco to visualize the grids in 2d (e.g.  a  slice in one of
the x,y z directions) but again with the possibility of a few hundred
thousand coloured polygons being  displayed, perhaps  tvtk/Mayavi is the
way to go for 2D as well (i.e. just flatten it from 3d).
 
I've spent the last few hours wandering around all the documentation and
links - lots of info but I've wandered into a "can't see the wood for
the trees" situation (I seem to do that a lot).


Regards

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Enthought-Dev] Mayavi, unstructured grid etc.

Gael Varoquaux

Very quickly, as I am drowning under work,

you definitely want to build unstructructured grid yourself, and I
believe that following the example is the best way to do it. If you
use numpy arrays, you should be able to reduce the performance cost.

As for Chaco, I believe that the Chaco file that you are talking about
has nothing to do with Enthought's Chaco, but I can't say for sure.

Gaƫl

On Tue, Jan 26, 2010 at 05:16:10PM +1300, Brennan Williams wrote:
> Some unstructured questions about unstructured grids....

> I have an existing app using Traits,Chaco etc.  I have unstructured
> grid(s), hexahedral cells with 8 corner points, 6 faces in an nx,ny,nz
> grid where each cell may or may not be connected to the adjacent cell
> (distorted voxels is I think what Andrea Gavana called them).
> I'm aiming to move this functionality from an existing 3D viz app,
> replacing it with tvtk,Mayavi embedded in a Traits dialog.

> So where do I start? Should I first write a filter to convert the
> proprietary grid file format into a VTK XML file? Or should I write
> something that creates an unstructured grid (as in the
> unstructured_grid.py example)? Forgetting about 3d performance for now,
> I'm sure I'll run into issues with importing a proprietary grid file
> using Python when I have anywhere from 20,000 cells at the low end to 5
> million+ cells at the high end.

> I also see that Mayavi has a Chaco File interface - I had been thinking
> about using Chaco to visualize the grids in 2d (e.g.  a  slice in one of
> the x,y z directions) but again with the possibility of a few hundred
> thousand coloured polygons being  displayed, perhaps  tvtk/Mayavi is the
> way to go for 2D as well (i.e. just flatten it from 3d).

> I've spent the last few hours wandering around all the documentation and
> links - lots of info but I've wandered into a "can't see the wood for
> the trees" situation (I seem to do that a lot).


> Regards

> Brennan


> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev

--
    Gael Varoquaux
    Research Fellow, INRIA
    Laboratoire de Neuro-Imagerie Assistee par Ordinateur
    NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
    ++ 33-1-69-08-78-35
    http://gael-varoquaux.info
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Enthought-Dev] Mayavi, unstructured grid etc.

Robert Kern
In reply to this post by Brennan Williams
On Mon, Jan 25, 2010 at 22:16, Brennan Williams
<[hidden email]> wrote:

> I also see that Mayavi has a Chaco File interface

This is not for Enthought's Chaco, but rather this Chaco:

  http://www.sandia.gov/~bahendr/chaco.html

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev