summaryrefslogtreecommitdiffstats
path: root/tabor/delavnica/manim/example.py
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-06-11 12:45:14 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-06-11 12:45:14 +0200
commitf9fc871c75bea9ad4b28e2244c5d6bb08dbe8664 (patch)
treed991b14e32ca33489654b280465cfb7fc942d324 /tabor/delavnica/manim/example.py
parentinfrnpredst in slomaturamd (diff)
downloadsola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar.gz
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar.bz2
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar.lz
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar.xz
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.tar.zst
sola-gimb-4-f9fc871c75bea9ad4b28e2244c5d6bb08dbe8664.zip
Diffstat (limited to 'tabor/delavnica/manim/example.py')
-rw-r--r--tabor/delavnica/manim/example.py19
1 files changed, 19 insertions, 0 deletions
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