There are two methods of creating a 2 dimensional image from the 3 dimensional information about the scene:
We have already looked at openGL where the colour and brightness are determined by the angle between the camera, the polygon and the sources of light.
Ray tracing is more accurate, but also more computationally intensive.
Raytracing
A ray is sent out from each pixel of the camera, when it hits something one or more reflected rays are generated until we reach a source of light. That it we work backwards in the opposite direction to which the photons of light travel.
Although ray tracing is more computationally intensive it is more accurate, especially when shadows or ra fraction of light (such as surface of water) are involved, these are more difficult to do with a render pipeline like openGL.