From f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sun, 11 Jun 2023 12:45:14 +0200 Subject: etc --- tabor/delavnica/manim/example.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tabor/delavnica/manim/example.py (limited to 'tabor/delavnica/manim/example.py') diff --git a/tabor/delavnica/manim/example.py b/tabor/delavnica/manim/example.py new file mode 100644 index 0000000..8356367 --- /dev/null +++ b/tabor/delavnica/manim/example.py @@ -0,0 +1,19 @@ + +from manim import * +# or: from manimlib import * +from manim_slides import Slide + +class BasicExample(Slide): + def construct(self): + circle = Circle(radius=3, color=BLUE) + dot = Dot() + + self.play(GrowFromCenter(circle)) + self.next_slide() # Waits user to press continue to go to the next slide + + self.start_loop() # Start loop + self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) + self.end_loop() # This will loop until user inputs a key + + self.play(dot.animate.move_to(ORIGIN)) + self.next_slide() # Waits user to press continue to go to the next slide -- cgit v1.2.3