angle of refraction is a function of the index of refraction
(Snell's law sin( thata(r) ) = (index-of-refraction(i)/index-of-refraction(r)) sin( thata(i) )
Shadows
opacity factor = (1-transparency coefficient)
Use hidden surface method to cast shadows:
Trace ray from light source to surfaces.
One pixel
Overview
example
The ray tracing algorithm
from each pixel trace ray back into image
find point ray intersects face
build ray tracing tree of specular highlights (following the reflection)
(left branches for reflection, right for transmission)
shadow rays
Refinements
enclose groups of objects in bounding cubes or (better) spheres
subdivide space and test the subparts
Antialiased ray tracing
(bundles of rays)
Radiosity lighting model
(take care of the diffuse light)
put hemi-cube over each face
(or subpart of face)
sum (integrate) light leaving
use defuse light model to light all other faces
(shoot rays of light to other faces)