[40]Moving/Rotating
class MovingRotating(Scene): def construct(self): ani_classes = { "MoveAlongPath": (MoveAlongPath,), "Rotate": (Rotate,), "Rotating": (Rotating,), "TurnInsideOut": (TurnInsideOut,), } idx = 1 for name, ani in ani_classes.items(): if name == "MoveAlongPath" : self.move_along_path(idx, name) elif name == "Rotate": self.rotate(idx, name) elif name == "Rotating": self.rotate(idx, name) elif name == ..
[39]Indicating
class IndicatingTest(Scene): def construct(self): self.indicating() def indicating(self): ani_classes = { "ShowCreationThenDestruction": (ShowCreationThenDestruction,), "Indicate": (Indicate, ), "WiggleOutThenIn": (WiggleOutThenIn,), "ApplyWave": (ApplyWave, ), } ani_classes_need_pre_exist={ "CircleIndicate": (CircleIndicate,), "FocusOn": (FocusOn,), "Flash": (Flash,), "ShowPassingFlashAround": ..
[38]Animation: Creation
Showing def showing(self): text = Text("Hello. This is animation test", size=0.5, stroke_width=0) circle1 = Circle(radius=1) circle2 = Circle(radius=1, fill_color=YELLOW, fill_opacity=1) line = Line(LEFT,RIGHT, stroke_width=10).set_width(4) circles = VGroup(circle1, circle2) text.next_to(circles,UP) circles.arrange(RIGHT) line.next_to(circles,DOWN) mobs = VGroup(text,circles,line) ani_classes = ..
[37]Animation's rate_func
def graph_rate_func2(self): axes = Axes( x_axis_config={ "unit_size": 2, } ) funcs = [smooth,linear,rush_into,rush_from, slow_into,double_smooth,there_and_back,there_and_back_with_pause, running_start,wiggle, lingering,exponential_decay, ] func_names = ['smooth','linear','rush_into','rush_from', 'slow_into','double_smooth','there_and_back','there_and_back_with_pause', 'running_start','wiggle', '..
[34]GraphScene
class GraphSceneTest(GraphScene): CONFIG = { "x_axis_label": "", "y_axis_label": "", "x_min": 0, "x_max": 15, "x_axis_width": 12, "y_min": 0, "y_max": 0.5, "y_axis_height": 6, "y_tick_frequency": 0.125, "graph_origin": 2.5 * DOWN + 5.5 * LEFT, } def construct(self): self.setup_axes() self.y_axis.add_numbers( 0.25, 0.5, 0.75, 1, number_config={ "num_decimal_places": 2, }, direction=LEFT, ) self.x..
[032]Axes
axes = Axes() class AxesTest(Scene): def construct(self): self.c2p_test() def c2p_test(self): axes = Axes( x_min=-10, x_max=10, y_min=-100, y_max=100, number_line_config={ "tick_size": 0.05, }, x_axis_config={ "unit_size": 0.5, "tick_frequency": 2, "include_numbers": True, "numbers_to_show": np.append(np.arange(-10,0,2),np.arange(2,10,2)), }, y_axis_config={ "unit_size": 6/200, "tick_frequency":..
[031]NumberLine
unit_size = 1 n_line = NumberLine( x_min=-5, x_max=5, unit_size=1, include_numbers=True, tick_frequency=1, ) self.add(n_line) self.wait() unit_size = 0.1 n_line = NumberLine( x_min=-50, x_max=50, tick_frequency=10, unit_size=0.1, include_numbers=True, numbers_to_show=np.arange(-50,50.1,10), ) leftmost_tick n_line = NumberLine( x_min=-50, x_max=50, tick_frequency=10, tick_size = 0.05, unit_size=0..