Initializing 3D Canvas...

Isovists & Viewshed

3 min read•1 page

Isovist Geometric Metrics:

1. Visual Area (A_v): Total square footage directly visible from the observation point. 2. Compactness Ratio: 4 π A / P^2 measures whether the visual field is circular (open) or fractured (labyrinthine). 3. Occlusivity: Length of visual boundary segments that correspond to occluding edges rather than solid walls.
python
1import numpy as np
2
3def compute_isovist_polygon(viewpoint, obstacles, max_radius=10.0, num_rays=360):
4 """
5 Computes Benedikt (1979) 2D isovist polygon from a viewpoint.
6 Casts radial rays in 360 degrees and finds the nearest intersection with room obstacles.
7 Key metrics: Area, Perimeter, Compactness (Circularity), and Occlusivity.
8 """
9 isovist_vertices = []
10 angles = np.linspace(0, 2 * np.pi, num_rays, endpoint=False)
11
12 for theta in angles:
13 ray_dir = np.array([np.cos(theta), np.sin(theta)])
14 closest_t = max_radius
15
16 for segment in obstacles:
17 t = ray_segment_intersect(viewpoint, ray_dir, segment)
18 if t is not None and t < closest_t:
19 closest_t = t
20
21 isovist_vertices.append(viewpoint + ray_dir * closest_t)
22
23 return isovist_vertices

Isovist Fields & Spatial Visibility: First formalized by Michael Benedikt in 1979, an isovist is the set of all spatial points visible from a single vantage point in space. By casting radial 360-degree sightlines until striking walls or columns, computational architects quantify human visual perception, measuring spatial openness, perimeter occlusivity, and surveillance sightlines.

Viewpoint X
-0.20
Viewpoint Y
-0.40
4 min read•1 page

Viewshed Invariant:

1. Line-of-Sight (LOS): Unbroken straight line connecting observer coordinate to target point. 2. Elevation Profile: Any intervening terrain obstruction whose elevation angle exceeds the sightline causes occlusion. 3. Visual Connectivity Graph: Encodes human movement desire lines and commercial foot-traffic potential.
python
1import numpy as np
2
3def compute_cumulative_viewshed(dem_grid, observer_points, observer_height=1.7):
4 """
5 Computes Digital Elevation Model (DEM) cumulative viewshed across a 2D terrain grid.
6 Scans radial Line-of-Sight (LOS) rays from each observer and tracks the running
7 maximum horizon elevation slope tan(alpha) = (z_cell - z_obs) / dist.
8 """
9 rows, cols = dem_grid.shape
10 viewshed = np.zeros((rows, cols), dtype=int)
11
12 for ox, oy in observer_points:
13 z_obs = dem_grid[oy, ox] + observer_height
14 for ty in range(rows):
15 for tx in range(cols):
16 steps = max(abs(tx - ox), abs(ty - oy))
17 if steps == 0:
18 viewshed[ty, tx] += 1
19 continue
20 max_slope = -np.inf
21 visible = True
22 for s in range(1, steps + 1):
23 cx = int(round(ox + (tx - ox) * (s / steps)))
24 cy = int(round(oy + (ty - oy) * (s / steps)))
25 dist = np.hypot(cx - ox, cy - oy)
26 slope = (dem_grid[cy, cx] - z_obs) / max(dist, 1e-6)
27 if s < steps and slope > max_slope:
28 max_slope = slope
29 elif s == steps and slope < max_slope:
30 visible = False
31 if visible:
32 viewshed[ty, tx] += 1
33 return viewshed

Cumulative Viewshed & Urban Sightlines: In regional master planning and skyline design, a viewshed identifies terrain and building zones visible from critical landmark viewpoints (such as historic monuments or observation decks). Computing mutual line-of-sight (LOS) across 3D city blocks highlights blind spots, public surveillance zones, and protected view corridors.

Tower Observer Height
2.00

Related Concepts