Mike Day: Overlap test for spotlight cone vs sphere
A ‘spotlight cone’ can be pictured as an ordinary right circular cone, the base of which has been inflated outwards to form part of a spherical surface centred on the cone’s apex. This shape is useful in lighting systems for finding all the objects which could be influenced by a given spotlight. This document shows a stripped-down calculation for testing whether a given spotlight cone overlaps a sphere, typically the bounding sphere of an object which may be lit. The calculation can be used as the basis for an optimized SIMD test for checking a batch of several spheres against a given spotlight cone.