Raytracer and pathtracer in Java