3D Modules for GRASS

Bill Brown brown at zorro.cecer.army.mil
Mon Jan 31 13:26:36 EST 1994


Andreas,

> Dear GrassUser and GrassProgrammer,
> 
>        I'm interested in developing some 3D visualisation tools embedded
>        into the XGRASS environment, esp. for geological purposes.
>
>        The code should be portable between several architectures and using
>        free code (the only one, witch is copyrighted is Motif).
>
>        I'm looking now for free 3D libs, my favourite choice would be
>        PEX.
>
>        Who has similar approaches, are there at CERL similar modules under
>        development, what are Your experiences with PEX, which libraries do 
>        you prefer?
>
>Thanks in advance....


In our 3D work we have been using IRIS GL primarily, with the idea
of porting programs to OpenGL as it becomes available on more
platforms.  Although OpenGL will not be free, it will probably become
a common software option, like Motif, and graphics accelerators are
being developed for OpenGL on several platforms.  There is also a  
discussion group of programmers thinking about creating a FreeGL library
you can join by subscribing to freegl at gnu.ai.mit.edu (send mail to
freegl-request at gnu.ai.mit.edu with SUB in subject line).  To my knowledge,
they haven't produced any code yet.

Last year we experimented a little with PEX and SIPP
(SImple Polygon Processor, by Jonas Yngvesson & Inge Wallin, 
jonas-y at isy.liu.se, ingwa at isy.liu.se, Linkoping Institute of Technology,
Sweden).  At the time, PEX didn't provide lighting capabilities; I
don't know if that has changed.  SIPP requires large data structures
for each graphic object, making it cumbersome for GIS applications
involving hundreds of thousands of polygons.  Terry Baker 
(baker at zorro.cecer.army.mil) is the programmer who worked with SIPP.

Our current & recent projects (using GL):

1) Enhanced SG3d to accept & display true 3D data as isosurfaces,
   also allowing the user to define orthogonal cutting planes to 
   view walls or cubes of data within the volume.  

   The data format used was a simple 3D grid (.grid3) file with some 
   header information describing region, resolution, etc.  We also have
   a module to convert HDF format to our grid3.  Currently, the user
   defines desired isosurface values to a module which uses the grid3
   file to create a display file (.dspf), using the "marching cubes"
   isosurface generation algorithm.  Then both the grid3 and
   dspf files are used by the display program, SG3d.

   Terry Baker did much of this programming work and Helena Mitasova 
   used it to demostrate 3D interpolation of dissolved inorganic 
   nitrogen in Chesapeake Bay.  Examples will be on display at the GRASS
   User's Conference in Reston. 


2) Rewrote SG3d to use Motif for the interface, replacing the NASA
   panels interface.  Also extended this program to allow viewing of
   multiple surfaces (i.e., soil horizons or other stratified phenomena) 
   simultaneously.  Each surface may use seperate raster maps for 
   elevation, color, or a mask.  And each may have various GRASS vector 
   or sites maps draped over the surface.  Each surface may also have
   a transparency value.

   Site files may also be displayed as 3D sites, using various marker
   objects and using the category for color.  (This has been temporarily
   implemented using a site format "<easting>|<northing>|#<elevation> <cat>",
   but will be easy to change once a standard is implemented.) 
   I've tried to keep the graphics-dependent routines separate from 
   the rest of the program, so it might be easier to port using other 
   graphics libraries. This program is still in a pre-alpha state, 
   but whatever I have will be demonstrated at the GRASS Conference.

Helena Mitasova & Irina Kosinovsky have been extending the spline/tension
interpolation programs to work with N-dimension data.  For more info
about that, see Helena's articles in GrassClippings or contact her at
helena at zorro.cecer.army.mil (she's away from CERL for about 6 weeks, but
will try to check her mail).


-Bill

***************************************************************************
Bill Brown				e-mail: brown at zorro.cecer.army.mil
USACERL - ECS				phone:  (217) 352-6511 ext 7676
PO Box 9005
Champaign, IL  61826-9005
***************************************************************************




More information about the grass-dev mailing list