Skip to content

Appendix A6 - Scene scale and geometric accuracy

Do intersections and images remain accurate when rays travel farther or triangles become larger? This case uses one inclined plane and a narrow occluding board, varying distance, plane size and view angle separately. Each input is compared with and without automatic triangle subdivision.

Scene and inputs

Choose a case, backend and mesh, then drag to rotate, or open the viewer separately. The default view clips the plane to a central 4 m × 2 m window and shows short ray segments. Select Full scene for the complete square and sensor positions. Orange points are simulated intersections; black crosses are analytic.

With horizontal coordinates measured from its centre, the plane satisfies \(z=2+sx\), with \(s=1/32\). The narrow board is parallel, 0.25 m above it, 0.5 m wide and 6 m long. Both are opaque Lambertian surfaces, with reflectances 0.4 and 0.1.

Condition Setting
Illumination Vertical parallel sunlight at 550 nm; normal irradiance 1 W m⁻² nm⁻¹
Environment No atmosphere or sky illumination; open boundaries
Radiation component Direct solar radiance after one surface reflection
Square side 20 m, 1 km, 10 km
Distance to the plane centre 10 m, 1 km, 10 km
Viewing direction From the east; zenith angles 0°, 30°, 75°
Radiance image 64 × 8 pixels over 4 m × 2 m on the horizontal reference plane at Z = 2 m
Sampling 64, 256 and 1024 samples per pixel, adopting 1024
Intersections Seven zero-divergence rays, including both sides of the board edges

Seven inputs change one factor at a time:

Case Square side Distance View zenith
Baseline 20 m 10 m 30°
Long range 1 20 m 1 km 30°
Long range 2 20 m 10 km 30°
Large triangles 1 1 km 10 m 30°
Large triangles 2 10 km 10 m 30°
Nadir 20 m 10 m 0°
Grazing 20 m 1 km 75°

The original plane and board each contain two triangles. Calling scene.subdivide_large_primitives(max_area=S*S/256) for a square of side S divides the plane into 512 triangles while preserving its shape, reflectance and observation conditions. Actual triangle counts are checked: the refined complete scene contains 514 triangles.

Independent analytic reference

Intersections and range

For a plane \(\mathbf n\cdot\mathbf p=b\), a ray from o along unit direction d has

\[ R=\frac{b-\mathbf n\cdot\mathbf o}{\mathbf n\cdot\mathbf d},\qquad \mathbf p=\mathbf o+R\mathbf d. \]

Intersect both surfaces, retain intersections inside their finite boundaries, and select the nearest positive range. This directly checks misses, occlusion, point position and range. The perpendicular distance from each simulated point to the nearest surface plane is checked separately.

Radiance and occlusion boundaries

Under vertical sunlight, both surfaces have incidence cosine \(1/\sqrt{1+s^2}\). Their sunlit radiance is

\[ L=\frac{\rho E_0}{\pi\sqrt{1+s^2}}. \]

The board, its cast shadow and the sunlit plane therefore have three known radiances. For viewing zenith θ, board width w and height gap h, let \(a=1-s\tan\theta\). The shadow and visible-board intervals on the image reference plane are

\[ I_{shadow}=\left[-\frac{aw}{2},\frac{aw}{2}\right],\qquad I_{strip}=I_{shadow}-h\tan\theta. \]

Where they overlap, the upper board is visible. Integrating each interval's overlap with a pixel gives its exact average radiance, including boundary pixels.

Results

Analytic and three-backend images for long rays, large triangles and a grazing view

All columns share one colour scale. At nadir, the board hides its shadow; oblique views show both.

Geometric errors, mesh comparison and image sampling checks

Solid lines denote coarse meshes; dashed lines denote refined meshes. Distance and triangle size are varied separately.

Metric Threshold
Maximum absolute point-position and range error Each ≤ 0.01 m
Maximum perpendicular distance to the nearest surface plane ≤ 0.002 m
Mean absolute pixel error / sunlit plane radiance ≤ 1%
Maximum relative radiance error in fully sunlit pixels ≤ 0.1%
Difference between coarse and refined column-mean images ≤ 0.5%
Column-mean image change between the final two sampling levels ≤ 0.5%

The last two metrics are normalized by sunlit plane radiance. Point positions and ranges come directly from zero-divergence point clouds, without waveform range quantization.

Backend Maximum point error / mm Maximum plane residual / mm Maximum range error / mm Mean image error Result
optix 0.7779 0.0075 0.2509 0.0852% Pass
vulkan 0.7779 0.0075 0.2509 0.0852% Pass
embree 0.4561 0.0005 0.2402 0.0852% Pass

All 42 backend/mesh combinations pass. Both meshes meet the thresholds within the tested distances, sizes and angles. Subdivision further reduces some intersection errors.

Downloads and reproduction

Keep the relative paths of the script and data/geometry-scale/. With LESS, NumPy and Matplotlib installed, run:

python scripts/appendix_geometry_scale.py --output build/geometry-scale
python scripts/appendix_geometry_scale.py --plot-only build/geometry-scale/results.json --output build/geometry-scale