fixed some problems with ideal ray tracing.  Must test a bit more.