def show_v_dt_for_all_rectangles(self):
    dt_brace_group = VGroup(self.dt_brace, self.dt_label)
    rects_subset = self.rects[10:20]
    last_rect = None
    for rect in rects_subset:
        brace = Brace(rect, LEFT, buff=0)
        v_t = TexMobject('v(t)')
        v_t.next_to(brace, LEFT, SMALL_BUFF)
        anims = [rect.set_fill, None, 1, dt_brace_group.next_to, rect, DOWN, SMALL_BUFF]
        if (last_rect is not None):
            anims += [last_rect.set_fill, None, 0.25, ReplacementTransform(last_brace, brace), ReplacementTransform(last_v_t, v_t)]
        else:
            anims += [GrowFromCenter(brace), Write(v_t)]
        self.play(*anims)
        self.wait()
        last_rect = rect
        last_brace = brace
        last_v_t = v_t
    self.v_t = last_v_t
    self.v_t_brace = last_brace
def show_v_dt_for_all_rectangles(self):
    dt_brace_group = VGroup(self.dt_brace, self.dt_label)
    rects_subset = self.rects[10:20]
    last_rect = None
    for rect in rects_subset:
        brace = Brace(rect, LEFT, buff=0)
        v_t = TexMobject('v(t)')
        v_t.next_to(brace, LEFT, SMALL_BUFF)
        anims = [rect.set_fill, None, 1, dt_brace_group.next_to, rect, DOWN, SMALL_BUFF]
        if (last_rect is not None):
            anims += [last_rect.set_fill, None, 0.25, ReplacementTransform(last_brace, brace), ReplacementTransform(last_v_t, v_t)]
        else:
            anims += [GrowFromCenter(brace), Write(v_t)]
        self.play(*anims)
        self.wait()
        last_rect = rect
        last_brace = brace
        last_v_t = v_t
    self.v_t = last_v_t
    self.v_t_brace = last_brace