What is the idea of Ray tracing and how it can be related to perspective projection?
Ray tracing is the process of casting rays from a fixed point (a “camera”) through each pixel of a virtual image positioned in front of that point. The rays are intersected with primitives in the scene (often polygons, though sometimes geometric primitives such as spheres or cubes are used as well), then lighting information is calculated based on the positions of light sources and the normal of the primitive at that point. This process is known as “ray casting.” Ray tracing extends this process recursively, so that more complicated effects such as reflections or refractions can be achieved. It is also often used backwards (e.g., rays are emitted from light sources instead of from the camera, the way it works in real life) to achieve such effects as indirect lighting.