What is the pseudo-code for the structure of a Ray Tracing program?

What is the pseudo-code for the structure of a Ray Tracing program?



For each pixel, do
Compute Viewing Ray
Find 1st object hit by ray and its surface normal n
Set pixel color to value computed from hit point, light, and surface normal n.