# Lecture_011_Geometric_Queries

## Exact Floating Point

### Bounding Volume Hierarchy

To know how exactly we should split the scene, we need some assumption:

• rays are randomly distributed

• rays are not occluded

Theorem: for convex object $A$ inside convex object $B$, the probability that a random ray that hits $B$ also hits $A$ is given by the ratio of the surface area $S_A$ and $S_B$ of these objects.

Pr\{\text{hit } A | \text{hit } B\} = \frac{S_A}{S_B}

Therefore, given a split, we can compute the cost of using this split:

C_{cost} = C_{travel} + C_{intersect}(\frac{S_A}{S_N} N_A + \frac{S_B}{S_N} N_B)

Where

• $C_{cost}$ is total cost.

• $C_{travel}$ is the cost of traversing an interior node (e.g. load data, bbox check).

• $C_{intersect}$ is the cost of computing any ray-primitive intersection (where we assume for simplicity that the cost is the same for all primitives).

• $S_N$ is total surface area of all primitives in both child A and B.

• $S_A$ is the otal surface area of primitives in child node $A$.

• $S_B$ is the otal surface area of primitives in child node $B$.

• $N_A$ is the number of primitives in child node $A$.

• $N_B$ is the number of primitives in child node $B$