An introduction to ray tracing