Ray casting is the use of ray–surface intersection tests to solve a variety of problems in 3D computer graphics and computational geometry.