How exact is the exact viewshed? Line of sight on the bilinear surface, with certified floating point

Viewshed programs treat a grid of heights as a surface, and the surface decides the answer. The method usually called exact, Franklin and Ray's R3, tests a sightline only where it crosses grid lines. We compute whole viewsheds exactly on the bilinear surface, cell interiors included. Along a ray, the elevation slope of a bilinear patch is α d + β + γ/d, so a patch's horizon has a closed form: R3's terms at the patch's faces plus one interior term. Each decision is made in floating point only when a certified error bound settles it, and otherwise in rational arithmetic; the rounding lemmas are machine-checked in Coq. R3 is the lower triangulation of the grid, so it can only show more visible cells than the bilinear surface. On 180 runs over ten real surfaces the excess, pooled per surface, is 0.22% (mostly sea) to 4.63% (a 30 m surface model of flat farmland); on one forested site it is 7.5 times larger on the canopy model than on the ground. Real horizons grow about like the square root of the number of patches. On one core the exact viewshed is ten times faster than GRASS r.viewshed. This record contains The preprint (PDF). The open package (paperA.tar.gz): the paper's source text and the appendix with the full proofs; the Coq proofs (make checks them); the scripts, result rows and logs of every study; a reproducibility package that reruns the five main studies against the public crate; the two independent reviews and supplementary derivations; and the source of the website. Links Interactive figures: https://yibbzz.github.io/exact-viewshed-paper/ Repository: https://github.com/Yibbzz/exact-viewshed-paper The viewshed crate (Rust, with Python bindings), release v0.6.1: https://github.com/Yibbzz/viewshed This is a preprint and has not been peer-reviewed. Licences: text, figures and data CC BY 4.0; code MIT OR Apache-2.0.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24786642
Primary Topic
Computer Graphics and Visualization Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

How exact is the exact viewshed? Line of sight on the bilinear surface, with certified floating point

Nathan Leeks
Zenodo (CERN European Organization for Nuclear Research)
Computer Graphics and Visualization Techniques
preprint

How exact is the exact viewshed? Line of sight on the bilinear surface, with certified floating point

Nathan Leeks
preprint en

Abstract

Viewshed programs treat a grid of heights as a surface, and the surface decides the answer. The method usually called exact, Franklin and Ray's R3, tests a sightline only where it crosses grid lines. We compute whole viewsheds exactly on the bilinear surface, cell interiors included. Along a ray, the elevation slope of a bilinear patch is α d + β + γ/d, so a patch's horizon has a closed form: R3's terms at the patch's faces plus one interior term. Each decision is made in floating point only when a certified error bound settles it, and otherwise in rational arithmetic; the rounding lemmas are machine-checked in Coq. R3 is the lower triangulation of the grid, so it can only show more visible cells than the bilinear surface. On 180 runs over ten real surfaces the excess, pooled per surface, is 0.22% (mostly sea) to 4.63% (a 30 m surface model of flat farmland); on one forested site it is 7.5 times larger on the canopy model than on the ground. Real horizons grow about like the square root of the number of patches. On one core the exact viewshed is ten times faster than GRASS r.viewshed. This record contains The preprint (PDF). The open package (paperA.tar.gz): the paper's source text and the appendix with the full proofs; the Coq proofs (make checks them); the scripts, result rows and logs of every study; a reproducibility package that reruns the five main studies against the public crate; the two independent reviews and supplementary derivations; and the source of the website. Links Interactive figures: https://yibbzz.github.io/exact-viewshed-paper/ Repository: https://github.com/Yibbzz/exact-viewshed-paper The viewshed crate (Rust, with Python bindings), release v0.6.1: https://github.com/Yibbzz/viewshed This is a preprint and has not been peer-reviewed. Licences: text, figures and data CC BY 4.0; code MIT OR Apache-2.0.

Zenodo (CERN European Organization for Nuclear Research)
Computer Graphics and Visualization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon