Ejemplo n.º 1
0
 def test_reflect(self):
     sphere = Sphere(1)
     rays = Rays([(0, 0, -1)], array([(A, B, 1)]) / sqrt(A**2 + B**2 + 1), None)
     reflection = sphere.reflect(rays)
     self.assertTrue(allclose(reflection.endpoints + reflection.directions,
                              [(0, 0, -1)]))