In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. Wikipedia
During my engineer degree we developed some parts of two retracers through two famous techniques.
Whitted’s Ray Tracer
Montecarlo Ray Tracer