Ray Tracing

(Hill: Chapter 14. Foley & van Dam: 16.12, p. 776-792 )


Ray tracing tree


  raytrace( ray )
     o find closest intersection
     o cast shadow ray, calculate colour_local
     o colour_reflect = raytrace( reflected_ray )
     o colour_refract = raytrace( refracted_ray )
     o colour = k1*colour_local + k2*colour_reflect
                                + k3*colour_refract
     o return( colour )

Comments