printing 3D views

Malcolm Williamson malcolm at
Mon Nov 8 10:55:31 EST 1993

Glenn Kroeger writes:
> Is there anyway to print a three-D view as generated by d.3d?  Ideally, is
> anyone working on a ps.3D (or does it already exist, I'm new to GRASS an am
> still navigating the documentation).

My recommendation is to create a raster layer of the 3d view by using the CELL
driver. Once the CELL driver is selected, you can run d.3d with the same 
parameters you were using with the normal graphics monitor (you don't see
anything when you use the CELL driver!). The resulting raster layer can then
be painted with (or, etc.). The important thing to do is to choose
a resolution for the CELL driver which reflects the final output resolution 
that you desire (and which your output device is capable of!).

The following is some general info on the CELL driver:
Thanks to a posting from Ronald Wiemer on grassu-list, I have finally figured
out how to use the CELL driver in GRASS. This enables you to capture anything
that you would normally display on a GRASS monitor (vectors, sites, labels,
legends, etc.) in a single GRASS raster layer. Here's how:

1) define the height and width of the CELL driver in pixels:
        setenv GRASS_WIDTH 2000 (or some other number)
        setenv GRASS_HEIGHT 2000 (ditto)

2) start the CELL driver:
        d.mon start=CELL

3) display your desired map layers, etc., just as you would on a monitor (you
don't get to see any of this!). All of the "d." commands work as usual. It may
help to compose the map on a regular GRASS monitor, and then save the commands
as a script, which can then be run with the CELL driver selected.

4) stop the CELL driver:
        d.mon stop=CELL

5) reselect your old GRASS monitor:
        d.mon select=x1 (or whatever you were running)

6) set your region to the new raster file created by the CELL driver; it will
always be called D_cell:
        g.region rast=D_cell

7) You can now display the raster map (d.rast D_cell), or use or to paint it. Be aware of the resolution of the output device, whether
it be your GRASS monitor, laser printer, or color printer, as compared to the
resolution that you chose for your CELL raster map. THIS IS IMPORTANT!!

Good luck! If you are having problems with this, get in touch with me.

Malcolm D. Williamson - Research Assistant       E-mail: malcolm at
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701

More information about the grass-user mailing list