Three Ways In · Layer 3 of 3 · Node.js 22+ · Zero Dependencies
Build a physically grounded raytracer and Bounding Volume Hierarchy accelerator with your coding agent across five rungs: shadow-acne surface offsets, NaN-safe slab AABB tests, Surface Area Heuristic (SAH) binning, closest-hit front-to-back BVH traversal, and Fresnel total-internal-reflection glass transport. Each rung gives you an architect prompt for Claude Code, Codex, or Cursor, a planted bug that unguided agents write, and a deterministic test suite that catches it.
0 * Infinity = NaN when an axis-parallel ray lies directly on a slab plane.far = hit.t after each triangle hit — Planted trap: Returning the first leaf hit before testing an overlapping nearer sibling box.Math.sqrt of a negative discriminant at steep internal angles instead of reflecting.unzip agent-track.zip && cd raytracer-bvh-lab/agent-track
node --test test/*.test.mjs
mkdir -p src/mine && cp -n src/traps/rung-*.mjs src/mine/
RAY_IMPLEMENTATION=src/mine node --test test/rung-01.test.mjs
Download 5-Rung Agent Track (agent-track.zip) Read AGENT-TRACK.md on GitHub Open agent-track/README.md on GitHub
Read the eight chapters · Explore the 3D tutor · Browse the earlier eight-chapter source on GitHub
git clone https://github.com/itsHabib/free-to-learn.git cd free-to-learn git switch --detach 7dba0d743224c10a707307769782b0db3f9a2a1a