google colab manim start
!sudo apt update
!sudo apt install libcairo2-dev ffmpeg \
texlive texlive-latex-extra texlive-fonts-extra \
texlive-latex-recommended texlive-science \
tipa libpango1.0-dev
!pip install manim
!pip install IPython --upgrade
from manim import *
#new cell
%%manim -qm -v WARNING CountingScene
class CountingScene(Scene):
def construct(self):
self.camera.background_color = WHITE
a= Dot().set_color(BLACK).scale(1).set_fill(opacity=.32).move_to(8*LEFT)
b= Square().scale(2).set_fill(YELLOW,opacity=.7).move_to(ORIGIN)
c= Rectangle().scale(1).set_fill(RED,opacity=1).move_to(10*RIGHT)
self.play(Transform(a,b),run_time=1.5)
b.set_fill(opacity=0)
self.play(Transform(b,c),run_time=1.5)