def construct(self):
     path = os.path.join(ANIMATIONS_DIR, MOVIE_PREFIX,
                         "ClearLeftSideBufferedCounting.mp4")
     SceneFromVideo.construct(self, path)
     for count in COUNT_TO_FRAME_NUM:
         path = os.path.join(ANIMATIONS_DIR, MOVIE_PREFIX, "images",
                             "Hand%d.png" % count)
         Image.fromarray(self.frames[COUNT_TO_FRAME_NUM[count]]).save(path)
 def construct(self):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, "ClearLeftSideBufferedCounting.mp4")
     SceneFromVideo.construct(self, path)
     for count in COUNT_TO_FRAME_NUM:
         path = os.path.join(
             VIDEO_DIR, MOVIE_PREFIX, "images",
             "Hand%d.png"%count
         )
         Image.fromarray(self.frames[COUNT_TO_FRAME_NUM[count]]).save(path)
 def construct(self, filename):
     path = os.path.join(ANIMATIONS_DIR, MOVIE_PREFIX, filename + ".mp4")
     SceneFromVideo.construct(self, path)
     for frame, count in zip(self.frames, it.count()):
         print(count + "of" + len(self.frames))
         mob = Mobject(*[
             TexMobject(char).shift(0.3 * x * RIGHT)
             for char, x, in zip(str(count), it.count())
         ])
         self.frames[count] = disp.paint_mobject(mob.to_corner(UP + LEFT),
                                                 frame)
 def construct(self, filename):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, filename+".mp4")
     SceneFromVideo.construct(self, path)
     for frame, count in zip(self.frames, it.count()):
         print(count + "of" + len(self.frames))
         mob = Mobject(*[
             TexMobject(char).shift(0.3*x*RIGHT)
             for char, x, in zip(str(count), it.count())
         ])
         self.frames[count] = disp.paint_mobject(
             mob.to_corner(UP+LEFT),
             frame
         )
 def construct(self, filename):
     path = os.path.join(ANIMATIONS_DIR, MOVIE_PREFIX, filename + ".mp4")
     SceneFromVideo.construct(self, path)
     total_time = len(self.frames) * self.frame_duration
     for count in range(32):
         print(count)
         mob = TexMobject(str(count)).scale(1.5)
         mob.shift(0.3 * LEFT).to_edge(UP, buff=0.1)
         index_range = range(max(COUNT_TO_FRAME_NUM[count] - 10, 0),
                             COUNT_TO_FRAME_NUM[count + 1] - 10)
         for index in index_range:
             self.frames[index] = disp.paint_mobject(
                 mob, self.frames[index])
 def construct(self, filename):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, filename + ".mp4")
     SceneFromVideo.construct(self, path)
     total_time = len(self.frames)*self.frame_duration
     for count in range(32):
         print(count)
         mob = TexMobject(str(count)).scale(1.5)
         mob.shift(0.3*LEFT).to_edge(UP, buff = 0.1)
         index_range = list(range(
             max(COUNT_TO_FRAME_NUM[count]-10, 0),
             COUNT_TO_FRAME_NUM[count+1]-10))
         for index in index_range:
             self.frames[index] = disp.paint_mobject(
                 mob, self.frames[index]
             )
 def construct(self):
     path = os.path.join(VIDEO_DIR, "CountingInBinary.m4v")
     time_range = (3, 42)
     SceneFromVideo.construct(self, path, time_range = time_range)
     self.buffer_pixels(spreads = (3, 2))
 def construct(self, filename, t1, t2):
     path = os.path.join(VIDEO_DIR, filename)
     SceneFromVideo.construct(self, path)
     self.apply_gaussian_blur()
     self.apply_edge_detection(t1, t2)
 def construct(self, video):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, video+".mp4")
     SceneFromVideo.construct(self, path)
     self.drag_pixels()
 def construct(self, scenename):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, scenename + ".mp4")
     SceneFromVideo.construct(self, path)
     self.set_color_region_over_time_range(
         Region(lambda x, y : x < -1, shape = self.shape)
     )
 def construct(self):
     path = os.path.join(VIDEO_DIR, "CountingInBinary.m4v")
     time_range = (3, 42)
     SceneFromVideo.construct(self, path, time_range = time_range)
     self.buffer_pixels(spreads = (3, 2))
 def construct(self, filename, t1, t2):
     path = os.path.join(VIDEO_DIR, filename)
     SceneFromVideo.construct(self, path)
     self.apply_gaussian_blur()
     self.apply_edge_detection(t1, t2)
 def construct(self, video):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, video+".mp4")
     SceneFromVideo.construct(self, path)
     self.drag_pixels()
 def construct(self, scenename):
     path = os.path.join(VIDEO_DIR, MOVIE_PREFIX, scenename + ".mp4")
     SceneFromVideo.construct(self, path)
     self.set_color_region_over_time_range(
         Region(lambda x, y : x < -1, shape = self.shape)
     )