How a raytracer works

Take a 3d environment and generate and photorealistic image (2-d) of the environment.

RGB decided by refraction, object properties, you have to decide this