RTAREA(1)
π RTAREA(1) β the rtarea girlies' guide π
okay so bestie, welcome to rtarea(1) from the BRL-CAD fam π this is the page where we learn how to ask "how much surface area is actually facing the camera rn" and get a genuinely useful answer. let's go π
β¨ NAME β¨
rtarea β computes the exposed and presented surface areas of geometry, from a view π
β¨ SYNOPSIS β¨
rtarea [options] model.g [objects...]
β¨ DESCRIPTION β¨
so rtarea uses librt(3) to ray trace the objects you list in the database model.g, from one single view direction, and then reports the projected surface area of each region, of each assembly (that's a combination containing regions, iykyk), plus the overall totals π«Ά the view is set with -a (azimuth) and -e (elevation), or by feeding a model-to-view matrix on standard input with -M. all results go to standard output as text. iconic behavior, no cap.
if you don't list any objects, rtarea falls back to the same automatic default-object selection described in rt(1). and if no single usable default can be resolved, it aborts before computing any areas β it's not gonna guess for you π
two areas get reported, and the difference actually matters:
- exposed area β the occluded 2D projection. this is literally what an observer would see if every object were opaque, so an object hiding behind another only contributes its visible fraction π
- presented area β the unoccluded 2D projection. each region is considered in isolation and reports its full silhouette, no matter what's sitting in front of it.
and here's the cute detail: when you're totaling presented area for a group, area covered by more than one region gets counted only once (the union of the regions), not the cumulative sum. math girlies stay winning β¨
only surfaces whose normal has a component facing back toward the ray are counted, so back faces don't get reported as presented area. bye π
accuracy depends on the grid resolution: finer cell spacing (smaller -g/-G, or larger -s) yields more accurate areas. area centers are off by default and can be enabled with -c "set cc=1".
okay and here's the diagram situation, because visual learners deserve nice things πΈ
|----------------| rear region |----------------| rear region
| | |****************|
| |--------------| front region |****************-------| front region
| |**************| |***********************|
|--------|**************| |--------|**************|
|**************| |**************|
|--------------| |--------------|
exposed = presented area of front exposed = presented area for groups
region (fully visible) (e.g. comb of both visible regions)
|----------------| rear region |----------------| rear region
|****************| |****************|
|********|--------------| front region |****************-------| front region
|********| | |**************** |
|--------| | |--------| |
| | | |
|--------------| |--------------|
exposed area of rear presented area of rear
region (partially occluded) region (partically occluded)
β οΈ Warning β οΈ the terminology and the output format of rtarea may change in future releases. so don't get too attached to the exact text, bestie π
β¨ OPTIONS β¨
-aazimuth β sets the view azimuth in degrees and enables auto-sizing. use it with-e; it conflicts with-Mπ«Ά-eelevation β sets the view elevation in degrees and enables auto-sizing. use it with-a; it conflicts with-Mβ¨-Mβ reads a model-to-view transformation matrix (plus an optional animation script) from standard input, instead of using-a/-eπ-s #β sets the square grid size to#rays on a side (default512). more rays = better area accuracy, periodt π₯-w #β sets the grid width in rays.-n #β sets the grid height in rays (scanlines).-g mmβ sets the grid cell width in millimeters. if you set it without-G, the cell height defaults to the same value (e.g.-g 25.4gives 1 inch ray spacing β love a unit conversion moment π ).-G mmβ sets the grid cell height in millimeters.-p degβ sets the perspective angle in degrees (0 <= deg < 180;0is orthographic, and that's the default).-V #[:#]β sets the view aspect ratio width/height (e.g.1.33or4:3).-u unitsβ reports areas in the named units (defaultmm). use-u modelfor the database's local units π-U #β sets whether air-coded regions are retained (0= discard,1= keep, and1is the default forrtarea).-P #β sets the maximum number of processor cores to use (negative = all but#). parallel girlies rise π§-c commandβ runs an rt script command before ray tracing; may be repeated βrtarearecognizesset compute_centers=#(or the aliasset cc=#) where1enables and0disables (default) computation and reporting of area centers.-x #β setslibrtdebug flags as a hexadecimal bit vector (seeraytrace.h).-X #β sets rt program/optical debug flags as a hexadecimal bit vector.-?or-hβ prints a usage summary and exits. the "help me help you" move π«Ά
β¨ EXAMPLES β¨
Example 1. areas of a group with centers, in inches
rtarea -u in -a 35 -e 25 -s 1024 -c "set cc=1" model.g all
ray traces the group all in model.g from azimuth 35, elevation 25 degrees on a 1024x1024 grid, reporting exposed and presented areas in square inches along with the center of each area. increasing the grid size and naming explicit units gives a more accurate, readable report than the defaults. she understood the assignment π
Example 2. front-view area from a saved MGED view
rtarea -M model.g component < saveview.rt
reuses the camera from an mged(1) saveview script (the matrix gets read from standard input via -M), so the area of component is measured from exactly the view that was set up interactively. chef's kiss, no notes π
β¨ SEE ALSO β¨
brlcad(1), mged(1), rt(1), rtweight(1), librt(3) β go read the whole friend group π
β¨ AUTHOR β¨
BRL-CAD Team π«Ά
β¨ COPYRIGHT β¨
this software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
β¨ BUG REPORTS β¨
reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β tell them everything, they want to know π
okay that's the whole page bestie, you're basically an area-measuring legend now πβ¨ this has been RTAREA(1) from BRL-CAD, and honestly? iconic of it. go compute something slay π
ππ¦
π¦ 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