manimref.txt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Installation on GNU Linux:
  2. Setp 1: Install LaTeX (TeX live)
  3. $ sudo apt-get install texlive-full
  4. Step 2: Install Python 3.7
  5. $ sudo apt-get install python3.7-minimal
  6. Step 3: Install PIP (need curl)
  7. $ sudo apt-get install curl
  8. $ mkdir InstallManim
  9. $ cd InstallManim
  10. $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  11. $ sudo python3.7 get-pip.py
  12. Step 4: Install FFmpeg, SoX and Cairo dependencies
  13. $ sudo apt-get install ffmpeg
  14. $ sudo apt-get install sox
  15. $ sudo apt-get install libcairo2-dev libjpeg-dev libgif-dev python3-dev libffi-dev
  16. $ python3.7 -m pip install pyreadline
  17. $ python3.7 -m pip install pydub
  18. Step 5: Download manim and move it to a directory that must not have spaces in the name
  19. Step 6: Open this directory with a terminal and run the following command to install
  20. Python plog-ins
  21. $ python3.7 -m pip install -r requirements.txt
  22. Example #1:
  23. from manim import *
  24. class squarecircle(Scene):
  25. def construct(self):
  26. circle = Circle(color=BLUE, fill_opacity=0.5)
  27. square = Square(color=GREEN, fill_opacity=0.8)
  28. square.next_to(circle, RIGHT)
  29. self.add(circle, square)
  30. Scene: animation canvas
  31. Circle, Square: manim objects
  32. color, fill_opacity: properties of manim objects
  33. colors (BLUE, GREEN) and directions (UP, DOWN, RIGHT, ..): some global constants
  34. generating output:
  35. * write code in program.py
  36. * then run in terminal (qm = quality medium, p = preview)
  37. $ manim -qm -p program.py squarecircle