NAME
d.3d - Displays three-dimensional images based on raster map layers.
(GRASS Display Program)
SYNOPSIS
d.3d
d.3d help
d.3d [-l0an]
map=name
elevation=name
[from_coordinate=x,y,z]
[to_coordinate=x,y,z]
[exaggeration=value]
[lines=value]
[field=value]
[color=name]
[box=name]
DESCRIPTION
d.3d
displays three-dimensional graphic images based on GRASS raster map layers.
The user identifies the viewing point, the line of sight, a vertical exaggeration factor,
the viewing angle (field of view), the frequency and color of vector grid lines
to appear in the display, the map to be displayed in 3-d, and the map whose category
values are to be used as elevation values in the 3-dimensional image.
The program will be run non-interactively if the user specifies all needed parameter
values and flag settings on the command line. Alternately, the user can simply
type d.3d on the command line; in this case, the program will prompt the
user for parameter values and flag settings using the standard interface described
in the manual entry for parser.
Three-dimensional images can also be generated
through the GRASS d.display program.
OPTIONS
Flags:
- -l
- Display lines only, without displaying the raster base
map.
- -0
- Show zero elevations.
- -a
- Each grid-cell is rendered using four elevation coordinates: one for each
corner. By default, each corner takes the value of the grid-cell to the lower
right. With the -a option each corner is calculated to be an average of the
four bordering cell elevation values.
- -n
- Show null elevations.
Parameters:
- map=name
- The raster map layer used to generate the color shown in the 3-d output
(i.e., the map whose x and y values will be displayed, using the z values
present in the elevation map layer.)
- elevation=name
- The raster map used to generate the texture in the 3-d image
(i.e., the map whose category values will become the elevation values in the
3-d map displayed). This need not be an elevation map layer, although elevation
is commonly used.
Default: elevation
- from_coordinate=x,y,z
- Coordinates of the viewing point, given as:
northing,easting,elevation.
The default from_coordinate value
is appropriate for the spearfish sample data set.
Default: Calculated at run-time just south-west of the south-west corner.
- to_coordinate=x,y,z
- Coordinates of center of view, given as:
northing,easting,elevation.
The default to_coordinate
value is appropriate for the spearfish sample
data set.
Default: Calculated at run-time as the center of the image
- exaggeration=value
- Vertical exaggeration factor. This value is multiplied by the "elevation" values
(category values) in the elevation map layer.
As the vertical coordinates are exaggerated, the elevation (z) value of the
center of view (the to_coordinate) should be increased.
Default: 2.0
- lines=value
- North-south and east-west trending lines can be drawn on the 3-d image
output, to enhance the 3-d effect. The lines value specifies
the number of rows and columns to skip between lines. 0 means
"display no lines". Lines will be drawn in the color stated.
The user can elect to only display these lines, without displaying the
map, by setting the -l flag.
Default: 1
- field=value
- The field of view (viewing angle) in the image, stated in degrees.
Default: 30
- color=name
- Color of vector lines drawn on the output.
Options: color, white, red, orange, yellow, green, blue, indigo, violet, gray, black
Default: gray
The resulting three-dimensional image is drawn in the active frame
on the graphics monitor. The user should select and erase the full graphics monitor
frame before running d.3d to prepare the screen for graphics.
Refer to the GRASS program
3d.view.sh
for a demonstration of the d.3d program.
INTERACTIVE MODE
The interactive mode prompts for the raster map to be rendered, the raster map
to be queried for elevation information, and an optionally saved set of saved
viewing parameters. The user is then presented with a form in which the
options can be modified.
It is suggested that the following procedure be used to efficiently find the
correct viewing parameters. Start with a gross grid (by default, a resolution
is chosen which limits the total number of rows and columns), display lines
only, set line colors to "color" (lines take their color from the map), set the
box color to something other than "none", and use the default viewing
coordinates. Experiment with the viewing coordinates until the map is
positioned in a desireable configuration. When the map is lined up correctly,
set the display resolution as low as you like for a final image.
BUGS
Several additions to this program have been suggested. These include the
following:
- Border the image with a visually appealing curtain.
- Add x,y,z coordinates and scale information to the displayed 3-d image.
- Provide a graphic-oriented user interface for identifying
viewing parameters.
- Display output more quickly by doing mathematics in integers.
- Add the option of plotting vector map layers.
SEE ALSO
3d.view.sh,
d.display,
d.erase,
d.frame,
parser
AUTHOR
James Westervelt, U.S. Army Construction Engineering Research Laboratory