← Back to team overview

dolfin team mailing list archive

Re: 3D plotting with transparent objects

 

Hi again,

in fact MayaVi2 turned out to do the job pretty good after all.
It saves figures with transparent objects directly to pdf/eps format (just remember to turn off compression and turn on "Write3d props as raster").
Example:
http://www.fys.ku.dk/~cosby/Figures/Gatepotential.pdf

I had the 3ddesk running in the background first time I used it, and that might have screwed up things a bit. But after killing that everything ran smoothly.

MayaVi2 can be installed pretty easily using eggs. Just type:

sudo easy_install --prefix /usr/local -f http://code.enthought.com/enstaller/eggs/debian/etch/unstable enthought.mayavi

or have a look at:
https://svn.enthought.com/enthought/wiki/InstallWithEggs

Kristen








Bartosz Sawicki wrote:
Garth N. Wells:
Kristen Kaasbjerg wrote:
I tried it out already, but didn't manage to save figures with transparent objects to eps format.


As far as I know, EPS does not support transparency.

EPS support transparency, but only for vector graphics.
Vector graphics is good solution for 2D figures, in 3D, raster figures are more often used.

My advice is similar to the one from Anders. Arrange view in your visualization software (eg. Paraview). Take a screenshot. Use Gimp to crop figure, you can also add transparency if you need it. Save in PNG.

regrd.
BArtosz


Garth

Kristen


Matthew Knepley wrote:
I recommend Mayavi2, which has all the Paraview functionality
but is open source and well supported. It is available through
Debian packages and Python eggs.

  Matt

On Wed, Mar 26, 2008 at 7:45 AM, Kristen Kaasbjerg <cosby@xxxxxxxxx> wrote:
So what do people in general do when they want to produce nice 3D plots ?

 Kristen




 Dag Lindbo wrote:
> As far as I know, it is impossible to render volumetric data to eps in
 > a meaningful and robust way (since the PS format is based around
> scaling vectors). Note that VTK, the underlying library in paraview, > mayavi, viper, only has "experimental" support for this (for simple 3d > scenes): http://www.vtk.org/doc/nightly/html/classvtkGL2PSExporter.html
 >
 > and relies on a library (GL2PS):
 > http://www.geuz.org/gl2ps/
 >
 > /Dag
 >
 >
 > Kristen Kaasbjerg wrote:
 >> Hi,
 >>
 >> I have been trying to use Mayavi for generating eps figures of my
 >> solutions from dolfin, but it doesn't seem to be able to handle
 >> transparent objects.
>> Is there anyone with some Mayavi experience that could help me out
 >> here ?
 >> Alternatively, are there any other nice packages out there for 3D
 >> plotting?
 >>
 >>
 >> Kristen
 >> _______________________________________________
 >> DOLFIN-dev mailing list
 >> DOLFIN-dev@xxxxxxxxxx
 >> http://www.fenics.org/mailman/listinfo/dolfin-dev
 >

 _______________________________________________
 DOLFIN-dev mailing list
 DOLFIN-dev@xxxxxxxxxx
 http://www.fenics.org/mailman/listinfo/dolfin-dev


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev





Follow ups

References