Java implementation of ray tracing