Beispiel #1
0
 def __init__(self, *args, **kwargs):
     Camera.__init__(self, *args, **kwargs)
     self.phi_tracker = ValueTracker(self.phi)
     self.theta_tracker = ValueTracker(self.theta)
     self.distance_tracker = ValueTracker(self.distance)
     self.gamma_tracker = ValueTracker(self.gamma)
     self.light_source = Point(self.light_source_start_point)
     self.frame_center = Point(self.frame_center)
     self.fixed_orientation_mobjects = dict()
     self.fixed_in_frame_mobjects = set()
     self.reset_rotation_matrix()
Beispiel #2
0
 def __init__(self, *args, **kwargs):
     Camera.__init__(self, *args, **kwargs)
     self.phi_tracker = ValueTracker(self.phi)
     self.theta_tracker = ValueTracker(self.theta)
     self.distance_tracker = ValueTracker(self.distance)
     self.gamma_tracker = ValueTracker(self.gamma)
     self.light_source = Point(self.light_source_start_point)
     self.frame_center = Point(self.frame_center)
     self.fixed_orientation_mobjects = dict()
     self.fixed_in_frame_mobjects = set()
     self.reset_rotation_matrix()
 def __init__(self, *cameras_with_start_positions, **kwargs):
     self.shifted_cameras = [
         DictAsObject(
             {
                 "camera": camera_with_start_positions[0],
                 "start_x": camera_with_start_positions[1][1],
                 "start_y": camera_with_start_positions[1][0],
                 "end_x": camera_with_start_positions[1][1] + camera_with_start_positions[0].get_pixel_width(),
                 "end_y": camera_with_start_positions[1][0] + camera_with_start_positions[0].get_pixel_height(),
             })
         for camera_with_start_positions in cameras_with_start_positions
     ]
     Camera.__init__(self, **kwargs)
Beispiel #4
0
 def __init__(self, *cameras_with_start_positions, **kwargs):
     self.shifted_cameras = [
         DictAsObject(
             {
                 "camera": camera_with_start_positions[0],
                 "start_x": camera_with_start_positions[1][1],
                 "start_y": camera_with_start_positions[1][0],
                 "end_x": camera_with_start_positions[1][1] + camera_with_start_positions[0].get_pixel_width(),
                 "end_y": camera_with_start_positions[1][0] + camera_with_start_positions[0].get_pixel_height(),
             })
         for camera_with_start_positions in cameras_with_start_positions
     ]
     Camera.__init__(self, **kwargs)
Beispiel #5
0
 def __init__(self, frame=None, **kwargs):
     """
     frame is a Mobject, (should almost certainly be a rectangle)
     determining which region of space the camera displys
     """
     digest_config(self, kwargs)
     if frame is None:
         frame = ScreenRectangle(height=FRAME_HEIGHT)
         frame.set_stroke(
             self.default_frame_stroke_color,
             self.default_frame_stroke_width,
         )
     self.frame = frame
     Camera.__init__(self, **kwargs)
Beispiel #6
0
 def __init__(self, frame=None, **kwargs):
     """
     frame is a Mobject, (should almost certainly be a rectangle)
     determining which region of space the camera displys
     """
     digest_config(self, kwargs)
     if frame is None:
         frame = ScreenRectangle(height=FRAME_HEIGHT)
         frame.set_stroke(
             self.default_frame_stroke_color,
             self.default_frame_stroke_width,
         )
     self.frame = frame
     Camera.__init__(self, **kwargs)
Beispiel #7
0
 def __init__(self, *image_mobjects_from_cameras, **kwargs):
     self.allow_cameras_to_capture_their_own_display=MultiCamera.CONFIG['allow_cameras_to_capture_their_own_display']
     self.image_mobjects_from_cameras = []
     for imfc in image_mobjects_from_cameras:
         self.add_image_mobject_from_camera(imfc)
     Camera.__init__(self, **kwargs)