DSP(nged)
query or compare DSP (Displacement Map Surface) primitive objects
π DSP(nged) β bestie's guide to DSP primitives β¨
okay so real talk, this is the dsp command from the BRL-CAD user commands, and it's literally here to help you query or compare DSP (Displacement Map Surface) primitive objects. no cap. π
πΈ SYNOPSIS πΈ
dsp object xy x y
dsp object diff obj2 [min_diff_val]
β¨ DESCRIPTION β¨
so the dsp command gives you two subcommands for snooping on DSP (Displacement Map Surface) primitive objects. and what even is a DSP primitive? glad you asked bestie β it represents a height-field terrain surface derived from a 2D raster data source, with integer height values on a uniform grid. terrain vibes. ποΈ
both subcommands need the database to be open β like, that's non-negotiable. and the object argument has to name an existing DSP primitive. no fake ones, no imaginary ones. π
π¦ Subcommands π¦
xy x yβ reports the integer height value stored at grid coordinates (x, y) inside the DSP object object. the coordinates are zero-based grid indices. if the coordinate is outside the bounds of the DSP grid, you get an error. periodt. πdiff obj2 [min_diff_val]β compares the height values of object and obj2 at every grid coordinate. heads up: the two DSP objects must have the same grid dimensions or this whole thing falls apart. it prints each (x,y) position plus the magnitude of the height difference wherever the values differ. and if you pass min_diff_val, only differences greater than or equal to that value get reported. filtered. iconic. π₯
β 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. slay. π
Example 2. Query a coordinate at the grid origin
mged> dsp terrain.dsp xy 0 0
returns the height at grid position (0, 0). origin behavior. we love to see it. π±
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. the way it just tells you everything π
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. lowkey the useful one tbh. π
π§ SEE ALSO π§
in(nged)make(nged)
π AUTHOR π
BRL-CAD Team β the main characters fr fr π«Ά
π BUG REPORTS π
if you find bugs or problems, report them via electronic mail to devs@brlcad.org. don't suffer in silence bestie, tell the devs. π¬
ngl that's the whole page β every flag, every coordinate, every threshold. go query some terrain. π
BRL-CAD Β· DSP(nged) β mwah, that's the version and date footer, catch you in the next manpage πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms