[LORENE] 3D visualization with OpenDX

Eric Gourgoulhon eric.gourgoulhon at obspm.fr
Mon Dec 15 07:52:24 CET 2003

Dear all,

3D visualization of scalar and vector fields has been (re-)introduced
in Lorene via the new methods:


These methods create files for visualization through OpenDX.
Please run a "lorene_up" command (or "cvs update -d") to
get them, as well as the associated OpenDX scripts.


OpenDX is a sofware developed by IBM, which can be freely
downloaded from the web page
Many rpm's exist for Linux (search opendx on rpmfind.net).
As quoted from the OpenDX-4.3.0-4mdk on my Mandrake 9.2
     URL         : http://www.opendx.org/
     Summary     : IBM OpenDX (Data Explorer)
     Description :
     OpenDX is a uniquely powerful, full-featured software package for the
     visualization of scientific, engineering and analytical data: Its open
     system design is built on a standard interface environments. And its
     sophisticated data model provides users with great flexibility in
     creating visualizations.

Note: one should install two packages: opendx itself and
opendx-samples which contains many examples.
Moreover, one should download the four manuals:
    programguide.pdf  quickguide.pdf  userguide.pdf  userref.pdf
from  http://www.opendx.org/

OpenDX in Lorene

OpenDX scripts (*.net files) are provided in the new directory
For the time being, there are only two such files:
     visu_section.net : visualization from the output of
                        input file for this script:
     visu_vector3d.net : visualization from the output of
                         input file for this script:

Actually the method Scalar::visu_section creates two files
    scalar_section.dxdata (formatted data file)
    scalar_section.dxhead (OpenDX header file)
where "scalar_section" is replaced the argument "filename"
of Scalar::visu_section if the default value 0x0 is not used.
Moreover if the parameter start_dx is set to true (default value),
Scalar::visu_section makes the symbolic link
     visu_section.dxhead -> scalar_section.dxhead
and launches OpenDX (script visu_section.net) as a subprocess.

Things are similar for Vector::visu_arrows.

Example of usage

cd $HOME_LORENE/Tutorial
cp $HOME_LORENE/Visu/OpenDX/*.net .

and you should see beautiful 3-D graphs,
in addition to the 2-D PGPLOT ones !

To launch OpenDX out of the scope of some Lorene code,
simply type:
     dx -edit visu_section.net
to open the OpenDX visual editor (the image is
then generated when "Execute Once" is selected in
the editor menu)
     dx -image visu_section.net
to produce directly the image, without opening
the visual editor.

Further developments

Please add your own visualization scripts in

There remains to do:
     -- volume (3D) rendering of a scalar field
         (Scalar::section displays only the values of the
         scalar field in a plane section)
     -- streamline visualization of a vector field
     -- etc...

Best wishes,


Eric Gourgoulhon
Laboratoire de l'Univers et de ses THeories (LUTH)
UMR 8102 du CNRS / Observatoire de Paris, F-92195 Meudon Cedex, France
tel: +33 (secretariat : +33
e-mail: Eric.Gourgoulhon at obspm.fr    WWW: http://www.luth.obspm.fr/

More information about the Lorene.list mailing list