Learning by Doing!
from manim import *
class FirstExample(Scene):
def construct(self):
blue_circle = Circle(color=BLUE, fill_opacity=0.5)
green_square = Square(color=GREEN, fill_opacity=0.8)
green_square.next_to(blue_circle, RIGHT)
self.add(blue_circle, green_square)
Generating Output ...
... the "normal" way:
- Write code in
file.py
- Then run
manim -qm -p file.py FirstExample
in terminal
... with Jupyter:
- Import manim, put code for scene in a cell
%%manim -qm FirstExample
at beginning of cell, then run it