IT lexicon › Programming › Visibility polygon

Visibility polygon

Programming På svenska → Updated: 2026-10-26

The polygon covering everything an observer can see from a given point, bounded by the scene's obstacles.

It is built by casting rays at every vertex of the surrounding edges — plus a pair just beside each vertex to catch what peeks out behind it — and joining the hit points in angular order. The result is a star-shaped region that looks exactly like the light cast by a point source in a room full of walls.

Used for 2D fields of view, fog of war, guard sight cones and soft 2D shadows in games like Monaco and Teleglitch. Closely related to line of sight, but where a line-of-sight check answers yes/no for a single target, the visibility polygon computes the whole visible area at once. A naive version is O(n log n) in the vertex count.

← Back to the lexicon