Theme Catppuccin
Make yourself at homeCatppuccin

A softer light for long learning sessions.

Appearance

Loading your preference…

Dark palette

Choose a dark palette to try it.

Light uses Latte. Your choices stay in this browser.

A map for the rays

SKETCHBOOK / 06 The Lantern Room · 2-week chapter

Page 1 of 3: Bounds are a conservative promise

AABB / intervals

Bounds are a conservative promise

An axis-aligned box gives a cheap question: can this ray reach anything stored below this node? A false positive costs extra work; a false negative can erase geometry. Keep the primitive intersection as the oracle while you learn the interval test.

The companion handles a zero direction component as a parallel slab instead of dividing by zero. It accepts a ray on a slab boundary conservatively and rejects boxes wholly behind the ray. Query origins, directions, and bounds have a finite bounded contract before traversal begins.

These tests are a bounded educational baseline, not a complete proof of floating-point robustness for every grazing configuration. When integrating triangles, motion, or transformed instances later, extend the conservative-bound policy and adversarial tests instead of assuming a sphere exercise establishes all those cases.

TRY IT IN YOUR STUDIO

Calculate the three slab intervals for an axis-aligned ray, including a signed-zero component and an origin exactly on a face.

From the page to your own work

Your studio assignment.

Integrate a small acceleration structure without changing the room image.

A finish line you can see

A query-equivalence report, independent edge cases, and one reproducible timing comparison.

  1. Exercise parallel and boundary slab cases.
  2. Compare hit ids and distances with the linear oracle.
  3. Test ownership after input storage changes.
  4. Separate build and query timing and disclose the host.
Keep the evidence in your weekly notebook ↗
Explain it like an engineer

Try answering aloud before opening the review notes. Use your own implementation as evidence.

Why is a bounding-box false negative more serious than a false positive?
  • A false negative skips possible visible geometry.
  • A false positive only preserves extra work.
  • Conservative tests and independent primitive checks protect the answer.

These prompts support practice; they are not an automatic assessment of your work.

A small creative variation ↗

Try two leaf sizes in your own index and measure one fixed ray set.

Optional. Save it for later if this chapter already feels full.

Coming back after a break? ↩

Run only the known central hit and the linear/BVH agreement test before editing the builder.

Books & principles behind this study +

Original Parallax explanations and assignments, with these works for further reading.

YOUR MARGIN NOTES

Leave yourself a good question.

What changed your mind? What would you try next?

Notes are private to this browser and saved as you write.

A CHECKPOINT, NOT A SCORE

Can you explain the idea and try the exercise yourself?

Completion records your own assessment. It does not compile or test your C++.
Companion source 10 files