The Average Projected Area of Non-Convex Surfaces

A generalization of Cauchy’s surface area formula via ambient occlusion

Abstract

In 1800's, Cauchy proved that the average projected area of a convex surface is exactly one fourth of its surface area. For non-convex surfaces, the average projected area must be less than one fourth, because the surface can hide (occlude) other parts of itself. The goal of this work is to provide an exact correction to Cauchy’s surface area formula for all non-convex surfaces. We do this by introducing area-weighted mean cosine-weighted ambient occlusion, a surface integral that measures the average amount of light blocked by the surface. This, in turn can be used as convexity measure, which can also be used to compute the average projected area of a non-convex surface. Future work will explore the properties of this measure and its applications in biology and physics.

Cube: orthographic projected shadow on a ground plane.

Torus: orthographic projected shadow on a ground plane.

Ambient Occlusion is a topic from computer graphics, but it is a natural generalization of the concept of visibility. This motivates formalizing the relationship between occlusion and visibility, a key insight that ultimately simplifies to the main result, even more than I initially expected.

I would highly recommend watching 3Blue1Brown Video Solving this for the Convex Case for a more intuitive explanation. His video "But why is a sphere's surface area four times its shadow?" is also a great introduction to the topic. Last but not least, I would recommend Greg Egan's article Average Shadows for the case where the shadow is not orthographic, due to the light source being at a finite distance.

Introduction and Main Result

Theorem (Main Result).

Let \(K\) be a compact body whose boundary \(\partial K\) is piecewise smooth, with total surface area \(S\). Then the average orthographic projection area over uniformly random orientations is

\[ \overline{A}=\frac{S}{4}\left(1-\langle AO\rangle\right)=\frac{S\cdot C_M}{4} \Rightarrow 1 - \frac{4 \cdot \overline{A}}{S} = \langle AO\rangle \] where \(\langle AO\rangle\) is the area-weighted mean cosine-weighted ambient occlusion and \(C_M := 1-\langle AO\rangle\) is the Moeini Convexity Measure.

Definitions and Notations

We group notation by whether it is global (shape-level), local (point-wise), or directional vector.

Global (shape-level)

Local surface fields (depend on \(\mathbf{x}\in\partial K\))

Directional quantities

Visibility indicator (depend on both \(\mathbf{x}\) and \(\mathbf{u}\))

More importantly how we formalize these definitions together allows us to derive the main result.

Definition 1 ( \(\mathbf{n}(\mathbf{x})\) and \(\omega\) vector)

For every unit normal vector \(\mathbf{n}(\mathbf{x})\) pointing outward from the surface at \(\mathbf{x}\) it is accompanied by a set of hemisphere direction vectors \(\omega \in S^2\) such that \(\mathbf{n}(\mathbf{x})\cdot \omega \geq 1\).

Static torus with a chosen surface point \(x\) (red), its outward unit normal \(\mathbf{n}(x)\) (blue), and a direction vector \(\omega\) (green) moving over the outward hemisphere at the same point.

Definition 2 (Visibility indicator \(V(\mathbf{x},\mathbf{u})\))

For a viewing direction \(\mathbf{u} \in S^2\) (the unit sphere), define the visibility function

\[ V(\mathbf{x}, \mathbf{u}) = \begin{cases} 1 & \text{if } \mathbf{x} \text{ is visible from direction } \mathbf{u} \\ 0 & \text{if } \mathbf{x} \text{ is occluded by other parts of } K \end{cases} \]

Precisely, \(V(\mathbf{x}, \mathbf{u}) = 1\) if and only if \(\mathbf{x}\) is the first surface point encountered when tracing a ray from infinity in direction \(-\mathbf{u}\).

We pick a fixed surface point \(x\) on the torus. A direction \(\mathbf{u}\) (cyan) moves on \(S^2\); the orange ray comes from infinity in direction \(-\mathbf{u}\). The point turns green if \(V(x,\mathbf{u})=1\) (first hit), otherwise red.

Definition 3 (Orthographic Projection Area)

For a given viewing direction \(\mathbf{u} \in S^2\), the orthographic shadow area is

\[ A_{\mathrm{proj}}(\mathbf{u}) = \int_{\partial K}(\mathbf{n}(\mathbf{x}) \cdot \mathbf{u})_+\;V(\mathbf{x}, \mathbf{u})\, dA(\mathbf{x}), \] where \((a)_+ := \max(a, 0)\) ensures only forward-facing surfaces contribute. This integral should be viewed as a sum of three factors were \((\mathbf{n}(\mathbf{x}) \cdot \mathbf{u})_+\) is the cosine factor, \(dA(\mathbf{x})\) is the surface area element, and \(V(\mathbf{x}, \mathbf{u})\) is the visibility indicator. When the angle of the normal vector and the direction vector is less than 90 degrees, the cosine factor is positive and the surface area element is added to the projection area.

Projection integrand intuition: a small patch at a point \(x\) with normal \(\mathbf{n}(x)\) (blue) and a direction \(\mathbf{u}\) (cyan). The patch brightness follows \((\mathbf{n}(x)\cdot\mathbf{u})_+\): it brightens when front-facing and dims when back-facing.

\(A_{\mathrm{proj}}(\mathbf{u})\) is particularly useful when we want to compute the average projected area of a non-convex surface. As it's a global measure however its depends on \(\mathbf{u} \in S^2\) and thus we need to average over all directions. It is essential to use \(\mathbf{u}\) as its the same cordinate system as local quantities which allows us to build global and local quantities together.

Definition 4 (Average Shadow Area)

The average shadow area over all possible orientations is obtained by integrating over the unit sphere \(S^2\) with the uniform measure:

\[ \overline{A} := \frac{1}{4\pi} \int_{S^2} A_{\text{proj}}(\mathbf{u}) \, d\sigma(\mathbf{u}), \] where \(d\sigma\) is the standard surface measure on \(S^2\).

Monte Carlo average over directions: we sample directions \(\mathbf{u}\in S^2\), compute \(A_{\mathrm{proj}}(\mathbf{u})\) for a unit cube, and show the running estimate converging to \(S/4\) (for a unit cube, \(S=6\Rightarrow S/4=1.5\)).

Same experiment with a different frame: the cube stays fixed while the ground plane and light source rotate with the sampled direction \(\mathbf{u}\). This shows how the local and global measures can use the same coordinate system to compute the average projected area.

Definition 5 (Cosine-Weighted Ambient Occlusion)

At each point \(\mathbf{x} \in \partial K\), define the ambient occlusion factor as

\[ AO(\mathbf{x}) := \frac{1}{\pi} \int_{H(\mathbf{x})} [1 - V(\mathbf{x}, \omega)] \cdot (\mathbf{n}(\mathbf{x}) \cdot \omega) \, d\sigma(\omega) \]

where the first factor \([1 - V(\mathbf{x}, \omega)]\) is the occlusion indicator and the second factor \((\mathbf{n}(\mathbf{x}) \cdot \omega)\) is the cosine weight. This measures the fraction of the outward hemisphere that is occluded by the shape itself, weighted by the cosine of the angle from the normal.

A ray \(\omega\) sweeps across the hemisphere \(H(\mathbf{x})\). When it hits an occluder, \(V(\mathbf{x}, \omega) = 0\) and the direction contributes to the occlusion integral. When clear, \(V = 1\) and the cosine-weighted contribution \((\mathbf{n} \cdot \omega)\) is shown.

The Derivation

This derivation can be split into four steps, each with its own insight. Most importantly, it recovers Cauchy's projection formula as a special case, without any proir assumptions.

Step 1: Interchanging Integration Order

Recalling definition 3, 4:

\[ \overline{A} := \frac{1}{4\pi} \int_{S^2} A_{\text{proj}}(\mathbf{u}) \, d\sigma(\mathbf{u}), \quad \] \[ A_{\mathrm{proj}}(\mathbf{u}) = \int_{\partial K}(\mathbf{n}(\mathbf{x}) \cdot \mathbf{u})_+\;V(\mathbf{x}, \mathbf{u})\, dA(\mathbf{x}) \]

By substituting the definition of \(A_{\mathrm{proj}}(\mathbf{u})\) into \(\overline{A}\) we get a double integral over the surface and the unit sphere.

\[ \overline{A} = \frac{1}{4\pi} \int_{S^2} \left[\int_{\partial K} (\mathbf{n}(\mathbf{x}) \cdot \mathbf{u})_+ V(\mathbf{x}, \mathbf{u}) \, dA(\mathbf{x})\right] d\sigma(\mathbf{u}) \]

We now apply Fubini's theorem to interchange the order of integration. This is valid since the integrand is non-negative and the domain is bounded:

\[ \overline{A} = \int_{\partial K} \left[\frac{1}{4\pi} \int_{S^2} (\mathbf{n}(\mathbf{x}) \cdot \mathbf{u})_+ V(\mathbf{x}, \mathbf{u}) \, d\sigma(\mathbf{u})\right] dA(\mathbf{x}) \]

The two expressions are equal, but they suggest two different viewpoints.

This already foreshadows the visibility–occlusion relationship: after swapping the integrals, the inner average is a function of the surface point \(\mathbf{x}\) (a local surface field). In the next step we will restrict the integration to the outward hemisphere to simplify the inner integral.

Step 2: Restricting to the Hemisphere

The motivation for this step is simple: for a fixed surface point \(\mathbf{x}\), a direction \(\mathbf{u}\) contributes to the projection integral only if the surface patch is front-facing from that direction. This is exactly what \((\mathbf{n}(\mathbf{x})\cdot \mathbf{u})_+ = \max(\mathbf{n}(\mathbf{x})\cdot \mathbf{u},0)\) enforces: whenever \(\mathbf{n}(\mathbf{x})\cdot \mathbf{u} < 0\), the patch is back-facing and contributes \(0\).

Therefore, in the inner average over the sphere, we can restrict attention to the outward hemisphere of directions at \(\mathbf{x}\) (and it is convenient to rename the direction variable \(\mathbf{u}\) to \(\omega\)):

\[ H(\mathbf{x}) := \{\omega \in S^2 : \mathbf{n}(\mathbf{x}) \cdot \omega \geq 0\} \]

With this restriction, the integrand no longer needs the “\(+\)” operator since \(\mathbf{n}(\mathbf{x})\cdot \omega \ge 0\) on \(H(\mathbf{x})\). So the inner integral becomes:

\[ \frac{1}{4\pi} \int_{S^2} (\mathbf{n} \cdot \mathbf{u})_+ V(\mathbf{x}, \mathbf{u}) \, d\sigma(\mathbf{u}) = \frac{1}{4\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega) V(\mathbf{x}, \omega) \, d\sigma(\omega) \]

Finally, we rewrite the normalization to match the standard cosine-weighted hemisphere average: \(\frac{1}{4\pi} = \frac{1}{4}\cdot\frac{1}{\pi}\). This gives

\[ = \frac{1}{4} \cdot \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega) V(\mathbf{x}, \omega) \, d\sigma(\omega) \]

Step 3: Introducing Ambient Occlusion

The key idea is to separate the cosine-weighted hemisphere into the directions that are visible and the directions that are occluded. We encode the occluded part by defining \(AO(\mathbf{x})\) (Definition 5):

\[ \begin{aligned} AO(\mathbf{x}) &:= \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\,(1 - V(\mathbf{x}, \omega)) \, d\sigma(\omega) \\ &= \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\ - (\mathbf{n} \cdot \omega)V(\mathbf{x}, \omega) \, d\sigma(\omega) \\ &= \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\, d\sigma(\omega)\;-\;\frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\,V(\mathbf{x}, \omega) \, d\sigma(\omega) \end{aligned} \]

By rearranging the terms we get, we can see that the first term is the same the inner integral we computed in step 2.

\[ \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\,V(\mathbf{x}, \omega) \, d\sigma(\omega) = \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\, d\sigma(\omega) - AO(\mathbf{x}), \] however, now we created a new integral that has no dependency on the surface point \(\mathbf{x}\), it is a global quantity geometric constant. We name it \(C\) and it is the normalization constant for the cosine-weighted hemisphere average. \[ C := \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega)\, d\sigma(\omega). \]

To evaluate \(C\), use spherical coordinates with \(\mathbf{n}\) as the polar axis (so \(\mathbf{n}\cdot\omega = \cos\theta\) and \(d\sigma = \sin\theta\,d\theta\,d\phi\) on the unit sphere), we compute

\[ \begin{aligned} C &= \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n}\cdot\omega)\, d\sigma(\omega) \\ &= \frac{1}{\pi} \int_{0}^{2\pi} \int_{0}^{\pi/2} \cos\theta \,\sin\theta \, d\theta \, d\phi \\ &= \frac{2\pi}{\pi} \int_{0}^{\pi/2} \cos\theta \,\sin\theta \, d\theta \\ &= 2 \cdot \frac{1}{2}\sin^2\theta \Big|_{0}^{\pi/2} \\ &= 1 \end{aligned} \]

Thus we obtain a rigorous visibility–occlusion relationship. Essentially a conservation-of-energy (or total-mass) statement. If a surface point contributes to the projection integral for a given direction, it must be visible from that direction; otherwise, it is occluded and contributes nothing.

Visibility–Occlusion Relationship.

\[ \frac{1}{\pi} \int_{H(\mathbf{x})} (\mathbf{n} \cdot \omega) V(\mathbf{x}, \omega) \, d\sigma(\omega) = 1 - AO(\mathbf{x}). \]

Step 4: Final Derivation

Now substitute the hemisphere-restricted form from Step 2

\[ \overline{A} = \int_{\partial K}\left[\frac{1}{4}\cdot\frac{1}{\pi}\int_{H(\mathbf{x})}(\mathbf{n}\cdot\omega)\,V(\mathbf{x},\omega)\,d\sigma(\omega)\right] dA(\mathbf{x}) \]

Applying the visibility–occlusion relationship \(\frac{1}{\pi}\int_{H}(\mathbf{n}\cdot\omega)V\,d\sigma = 1 - AO(\mathbf{x})\):

\[ = \int_{\partial K}\frac{1}{4}\bigl(1-AO(\mathbf{x})\bigr)\,dA(\mathbf{x}) \]

\[ = \frac{1}{4}\int_{\partial K}\bigl(1-AO(\mathbf{x})\bigr)\,dA(\mathbf{x}) \]

\[ = \frac{1}{4}\left[\int_{\partial K} dA(\mathbf{x}) - \int_{\partial K} AO(\mathbf{x})\,dA(\mathbf{x})\right] \]

Recognizing that \(\int_{\partial K} dA = S\), we obtain a key insight: the average projected area equals one-quarter of the surface area, minus a correction for occlusion.

\[ = \frac{1}{4}\left[S - \int_{\partial K} AO(\mathbf{x})\,dA(\mathbf{x})\right] \]

We define the area-weighted mean ambient occlusion as, normalizing by the surface area is a common way to average a local quantity over a surface and it helps factor out the \(S\) term.

\[ \langle AO \rangle := \frac{1}{S} \int_{\partial K} AO(\mathbf{x}) \, dA(\mathbf{x}) \]

Substituting this definition gives:

\[ \overline{A} = \frac{1}{4} [S - S \cdot \langle AO \rangle] = \frac{S}{4} [1 - \langle AO \rangle] = \frac{S \cdot C_M}{4} \]

where \(C_M := 1 - \langle AO \rangle\) is the Moeini Convexity Measure.

This completes the proof. ∎

Special Cases and Applications

Convex Shapes (Cauchy's Formula)

Theorem (Cauchy's Projection Formula).

For any convex shape with surface area \(S\),

\[ \overline{A} = \frac{S}{4} \]

Proof. For convex shapes, no point occludes any other, so \(V(\mathbf{x}, \omega) \equiv 1\) for all \(\mathbf{x}\) and \(\omega\). Thus, from the definition of ambient occlusion, the integrand \([1 - V]\) is always zero:

\[ AO(\mathbf{x}) = 0 \quad \Rightarrow \quad \langle AO \rangle = 0 \quad \Rightarrow \quad C_M = 1 \]

Therefore, our main result becomes:

\[ \overline{A} = \frac{S \cdot C_M}{4} = \frac{S}{4} \quad \square \]

Physical Interpretation: Radiative Heat Transfer

There is a natural physical interpretation for this result. In diffuse radiative exchange, the fraction of the hemisphere at each surface point that "sees" the external environment, rather than other parts of the surface, governs the net heat transfer. This is precisely what \(1 - AO(\mathbf{x})\) measures.

Intuitively, points deep in cavities have \(AO(\mathbf{x}) \to 1\), seeing mostly nearby surfaces at similar temperature, and thus contribute little to net radiation exchange. As \(\langle AO \rangle \to 1\), we would expect the effective radiating area \(S_{\mathrm{eff}} = S \cdot C_M \to 0\): highly self-occluded surfaces should not efficiently exchange thermal radiation with the external environment. A rigorous derivation of this connection is left for future work.

Algorithmic Implications

Computing \(\langle AO \rangle\) directly requires a four-dimensional integral (two dimensions over the surface, two over each hemisphere), with each sample requiring a visibility query (ray tracing). For complex shapes, this is computationally expensive.

\[ \langle AO \rangle = \frac{1}{S \cdot \pi} \int_{\partial K} \int_{H(\mathbf{x})} [1 - V(\mathbf{x}, \omega)] \cdot (\mathbf{n}(\mathbf{x}) \cdot \omega) \, d\sigma(\omega) \, dA(\mathbf{x}) \]

However, our main result provides an alternative. Rearranging the theorem gives:

\[ \langle AO \rangle = 1 - \frac{4 \cdot \overline{A}}{S} \]

This means we can compute \(\langle AO \rangle\) by first estimating \(\overline{A}\), which is far simpler and computationally cheaper as it requires only rasterization, not ray tracing.

Practical algorithm for \(\overline{A}\):

  1. Sample \(N\) uniformly random directions \(\mathbf{u}_1, \ldots, \mathbf{u}_N\) on the sphere.
  2. For each direction \(\mathbf{u}_i\), set up an orthographic camera looking along \(\mathbf{u}_i\).
  3. Rasterize the mesh into a binary buffer (1 = occupied, 0 = empty).
  4. Count occupied pixels and multiply by the physical area per pixel to get \(A_{\mathrm{proj}}(\mathbf{u}_i)\).
  5. Average: \(\overline{A} \approx \frac{1}{N}\sum_{i=1}^{N} A_{\mathrm{proj}}(\mathbf{u}_i)\).

This Monte Carlo approach converges quickly and leverages GPU rasterization, making it orders of magnitude faster than direct ambient-occlusion integration for many applications.

Conclusion

For any closed, piecewise-smooth surface with area \(S\), the average orthographic shadow area is

\[ \overline{A} = \frac{S}{4}(1 - \langle AO \rangle) = \frac{S \cdot C_M}{4} \]

This single formula generalizes Cauchy's classical result to non-convex shapes, with the correction factor \(C_M = 1 - \langle AO \rangle\) capturing precisely how much self-occlusion reduces the effective shadow. The derivation requires only that the surface be piecewise-smooth and the visibility function measurable—conditions satisfied by virtually all shapes of practical interest, including polyhedra.


This blog post was made possible with three.js and KaTeX.