You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
657 B
21 lines
657 B
3 months ago
|
from manim import *
|
||
|
|
||
|
|
||
|
class RotationUpdater(Scene):
|
||
|
def construct(self):
|
||
|
def updater_forth(mobj, dt):
|
||
|
mobj.rotate_about_origin(dt)
|
||
|
|
||
|
def updater_back(mobj, dt):
|
||
|
mobj.rotate_about_origin(-dt)
|
||
|
line_reference = Line(ORIGIN, LEFT).set_color(WHITE)
|
||
|
line_moving = Line(ORIGIN, LEFT).set_color(YELLOW)
|
||
|
line_moving.add_updater(updater_forth)
|
||
|
self.add(line_reference, line_moving)
|
||
|
self.wait(2)
|
||
|
line_moving.remove_updater(updater_forth)
|
||
|
line_moving.add_updater(updater_back)
|
||
|
self.wait(2)
|
||
|
line_moving.remove_updater(updater_back)
|
||
|
self.wait(0.5)
|