This is the most commonly-used algorithm, often accelerated with dedicated hardware. The OpenGL graphics library is based on this algorithm.
for each polygon in model project vertices of polygon onto viewing plane for each pixel inside the projected polygon calculate pixel colour calculate pixel z-value compare pixel z-value to value stored for pixel in z-buffer if pixel is closer, draw it in frame-buffer and z-buffer end end
for each pixel on screen determine ray from eye through pixel find closest intersection of ray with an object cast off reflected and refracted ray, recursively calculate pixel colour, draw pixel end