A community-maintained Python framework for creating mathematical animations.
Fixed bug in set_background_by_color_function
Sridhar Rameshc28b81a2307c
diff --git a/camera/camera.py b/camera/camera.pyindex 87b1ee36e..d97a4d7a0 100644--- a/camera/camera.py+++ b/camera/camera.py@@ -385,12 +385,12 @@ class Camera(object):def get_points_of_all_pixels(self):"""Returns an array a such that a[i, j] gives the spatial- coordsinates associated with the pixel self.pixel_array[i, j]+ coordinates associated with the pixel self.pixel_array[i, j]"""shape = self.pixel_array.shapeindices = np.indices(shape[:2], dtype = 'float64')all_point_coords = np.zeros((shape[0], shape[1], 3))- for i, space_dim in enumerate([SPACE_WIDTH, SPACE_HEIGHT]):+ for i, space_dim in enumerate([SPACE_HEIGHT, SPACE_WIDTH]):all_point_coords[:,:,i] = \indices[i,:,:]*2*space_dim/shape[i] - space_dimreturn all_point_coords@@ -411,7 +411,7 @@ class Camera(object):lambda p : float_rgba_to_int_rgba(point_to_rgba_func(p)),2, points_of_all_pixels))- self.reset()+ self.reset() # Perhaps this really belongs in set_background?class MovingCamera(Camera):