Skip to documentation
DocumentationAll documentsEnglish

DSP(nged)

NAME

dsp - query or compare DSP (Displacement Map Surface) primitive objects

On this page

SYNOPSIS

dsp object xy x y
dsp object diff obj2 [min_diff_val]

DESCRIPTION

The dsp command provides two subcommands for inspecting DSP (Displacement Map Surface) primitive objects. A DSP primitive represents a height-field terrain surface derived from a 2D raster data source with integer height values on a uniform grid.

Both subcommands require the database to be open. The object argument must name an existing DSP primitive.

Subcommands

xy x y

Report the integer height value stored at grid coordinates (x, y) within the DSP object object. The coordinates are zero-based grid indices. Returns an error if the coordinate is outside the bounds of the DSP grid.

diff obj2 [min_diff_val]

Compare the height values of object and obj2 at every grid coordinate. The two DSP objects must have the same grid dimensions. Prints each (x,y) position and the magnitude of the height difference where values differ. If min_diff_val is specified, only differences greater than or equal to that value are reported.

EXAMPLES

Example 1. Query the height at a grid coordinate

mged> dsp terrain.dsp xy 50 30

Returns the height value stored at grid position (50, 30) in terrain.dsp, for example: 1024.

Example 2. Query a coordinate at the grid origin

mged> dsp terrain.dsp xy 0 0

Returns the height at grid position (0, 0).

Example 3. Compare two DSP objects

mged> dsp terrain.dsp diff terrain_modified.dsp

Reports all grid positions where terrain.dsp and terrain_modified.dsp have different height values, with the magnitude of each difference.

Example 4. Compare with a minimum difference threshold

mged> dsp terrain.dsp diff terrain_modified.dsp 10

Reports only grid positions where the height difference between the two DSP objects is 10 or greater.

SEE ALSO

in(nged), make(nged)

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org