These are some visualizations I made to help understand the intersection of a ray with an axis aligned bounding box — the slab method.
TL;DR:
2D demo here
3D demo here
Algorithm:
Resources:
- Exhaustive list for ray-object intersections collected by the guys from real time rendering:
- Peter Shirley (& Andrew Kensler at Pixar)
- old code from “Graphics Gems”