Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from manimlib.imports import *
- class Convergence(GraphScene):
- CONFIG = {
- "x_axis_label": "$n$",
- "y_axis_label": "$a_n$",
- "x_min" : 0,
- "x_max" : 10.3,
- "y_min" : 0,
- "y_max" : 1.1,
- "graph_origin" : 5*LEFT +3*DOWN ,
- "function_color" : BLUE ,
- "tangent_color": YELLOW,
- "axes_color" : GREEN,
- "x_labeled_nums" : range(0,11,1),
- "center_point" : 0,
- "include_solution" : True
- }
- def construct(self):
- self.setup_axes(animate=False)
- wee_dot = Dot(color = YELLOW).next_to(self.coords_to_point(0,1),RIGHT*0)
- self.play(ShowCreation(wee_dot),run_time = 0.3)
- for n in range(1,11):
- point = Dot(color =WHITE)
- point.next_to(self.coords_to_point(n,1/2**n),RIGHT*0)
- self.play(ShowCreation(point),run_time = 0.5)
- self.play(ApplyMethod(wee_dot.move_to,self.coords_to_point(0,1/2**n)),run_time = 0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement