def plot_points(self):
    times = list(range(0, 9))
    points = [self.coords_to_point(t, v_func(t)) for t in times]
    dots = VGroup(*[Dot(p, radius=0.07) for p in points])
    dots.set_color(VELOCITY_COLOR)
    pre_dots = VGroup()
    dot_intro_anims = []
    for (time, dot) in zip(times, dots):
        pre_dot = dot.copy()
        self.speedometer.move_needle_to_velocity(v_func(time))
        pre_dot.move_to(self.speedometer.get_needle_tip())
        pre_dot.set_fill(opacity=0)
        pre_dots.add(pre_dot)
        dot_intro_anims += [ApplyMethod(pre_dot.set_fill, YELLOW, 1, run_time=0.1), ReplacementTransform(pre_dot, dot, run_time=0.9)]
    self.speedometer.move_needle_to_velocity(0)
    self.play(Succession(*dot_intro_anims, rate_func=linear), ApplyMethod(self.speedometer.move_needle_to_velocity, v_func(4), rate_func=squish_rate_func((lambda t: (1 - v_rate_func(t))), 0, 0.95)), run_time=5)
    self.wait()
def plot_points(self):
    times = list(range(0, 9))
    points = [self.coords_to_point(t, v_func(t)) for t in times]
    dots = VGroup(*[Dot(p, radius=0.07) for p in points])
    dots.set_color(VELOCITY_COLOR)
    pre_dots = VGroup()
    dot_intro_anims = []
    for (time, dot) in zip(times, dots):
        pre_dot = dot.copy()
        self.speedometer.move_needle_to_velocity(v_func(time))
        pre_dot.move_to(self.speedometer.get_needle_tip())
        pre_dot.set_fill(opacity=0)
        pre_dots.add(pre_dot)
        dot_intro_anims += [ApplyMethod(pre_dot.set_fill, YELLOW, 1, run_time=0.1), ReplacementTransform(pre_dot, dot, run_time=0.9)]
    self.speedometer.move_needle_to_velocity(0)
    self.play(Succession(*dot_intro_anims, rate_func=linear), ApplyMethod(self.speedometer.move_needle_to_velocity, v_func(4), rate_func=squish_rate_func((lambda t: (1 - v_rate_func(t))), 0, 0.95)), run_time=5)
    self.wait()