def show_rectangle(self):
    rect_list = self.get_riemann_rectangles_list(self.graph, x_min=0, x_max=8, n_iterations=6, start_color=BLUE_D, end_color=BLUE_D, fill_opacity=0.75)
    rects = rect_list[0]
    rect = rects[((len(rects) * self.sample_input) // 8)]
    dt_brace = Brace(rect, UP, buff=0)
    v_brace = Brace(rect, LEFT, buff=0)
    dt_label = dt_brace.get_text('$dt$', buff=SMALL_BUFF)
    dt_label.set_color(YELLOW)
    v_label = v_brace.get_text('$v(t)$', buff=SMALL_BUFF)
    v_label.add_background_rectangle()
    self.play(FadeOut(self.v_line), FadeIn(rect))
    self.play(GrowFromCenter(dt_brace), GrowFromCenter(v_brace), Write(dt_label), Write(v_label))
    self.wait(2)
    self.play(*it.chain([FadeIn(r) for r in rects if (r is not rect)], list(map(FadeOut, [dt_brace, v_brace, dt_label, v_label]))))
    self.wait()
    for new_rects in rect_list[1:]:
        self.transform_between_riemann_rects(rects, new_rects)
    self.wait()
def show_rectangle(self):
    rect_list = self.get_riemann_rectangles_list(self.graph, x_min=0, x_max=8, n_iterations=6, start_color=BLUE_D, end_color=BLUE_D, fill_opacity=0.75)
    rects = rect_list[0]
    rect = rects[((len(rects) * self.sample_input) // 8)]
    dt_brace = Brace(rect, UP, buff=0)
    v_brace = Brace(rect, LEFT, buff=0)
    dt_label = dt_brace.get_text('$dt$', buff=SMALL_BUFF)
    dt_label.set_color(YELLOW)
    v_label = v_brace.get_text('$v(t)$', buff=SMALL_BUFF)
    v_label.add_background_rectangle()
    self.play(FadeOut(self.v_line), FadeIn(rect))
    self.play(GrowFromCenter(dt_brace), GrowFromCenter(v_brace), Write(dt_label), Write(v_label))
    self.wait(2)
    self.play(*it.chain([FadeIn(r) for r in rects if (r is not rect)], list(map(FadeOut, [dt_brace, v_brace, dt_label, v_label]))))
    self.wait()
    for new_rects in rect_list[1:]:
        self.transform_between_riemann_rects(rects, new_rects)
    self.wait()