"The Americans are all here on time. That's surprising." -- Pete Topic: finding first ray/object intersections fast. Ray from O, v. Want to find p=o+tv. Want a sublinear search alg. in the ray tracer. t=inf. for(i=0;iepsilon Optimization #0: bounding sphere - reduces time constant, not time complexity (still have to check every object) Sphere is (p-c)^2-R^2=0. p is point on ray = o+tv. (o+tv-c)^2-R^2=0. So have quadratic: a=v^2, b=2v(o-c), c=(o-c)^2-R^2. so if b^2-4ac is positive, we hit it. If you normalize viewing rays, v^2 is always one. This is a tradeoff. Can do lots of optimizations if they're normalized, but have to normalize. Optimization #1: access-aligned paralellopiped (box) bounding box around each object. Is there a similarly trivial hit check for a box? Yes. Intersect with all six planes. As long as the regions where the ray is between ymin/max, xmin/xmax, we're between slabs. If these regions overlap, we intersect. If the intersection of the two intervals is non-null, the intersection is the t region that you're inside the box. Test is: is maxx