Animation engine for explanatory math videos
Project description
manim_express
Requirements
manim_kunyuan >= 0.27
sparrow_tool
fake_headers
requests
# helium
# pyperclip
Install
pip install manim_express
以上步骤将安装 manim_express
和 manimlib
. 然后就可以在任何代码位置导入使用这个动画库了.
快速开始
-
渲染一个动画: 3b1b:SquareToCircle
from manimlib import * from manim_express import EagerModeScene scene = EagerModeScene() circle = Circle() circle.set_fill(BLUE, opacity=0.5) circle.set_stroke(BLUE_E, width=4) square = Square() scene.play(ShowCreation(square)) scene.play(ReplacementTransform(square, circle)) scene.hold_on()
与渲染画面交互:
- 按住
d
键 然后移动鼠标可以改变三维空间中相机的旋转视角. - 按住
s
键 然后移动鼠标可以平移相机. - 按住
z
键 同时滚动鼠标滚轮以缩放画面. - 通过
r
重制相机视角. - 离开/退出当前动画:
q
ortab
- 暂停动画:
space
orctrl
- 前一段动画:
LEFT
- 后一段动画:
RIGHT
- 重新播放当前动画:
DOWN
- 按住
-
manim_express
vsMatplotlib
:
在某些情况你需要安装LaTeX 以渲染tex
字体.
幸运的是manim_express
中提供了在线的latex 编译选项. 通过设置SceneArgs.use_online_tex=True
进行激活.from manimlib import * from manim_express import * import numpy as np SceneArgs.use_online_tex = True # Use online latex compiler theta = np.linspace(0, 2*np.pi, 200) x = np.cos(theta) y = np.sin(theta) # matplotlib # import matplotlib.pyplot as plt # plt.plot(x, y, color='green', linewidth=2) # plt.axis("equal") # plt.show() # manim_express scene = EagerModeScene() scene.plot(x, y, color=GREEN, width=2, scale_ratio=1) scene.show_plot() scene.hold_on()
资源
-
Wiki
https://flyingframes.readthedocs.io/en/latest/index.html
https://3b1b.github.io/manim/
https://docs.manim.org.cn/
https://docs.manim.org.cn/shaders/ -
3B1B videos:
https://github.com/3b1b/videos
Examples
-
GOA model
-
Apply function
-
Double pendulum
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
manim_express-0.4.5.tar.gz
(196.2 kB
view hashes)
Built Distribution
manim_express-0.4.5-py3-none-any.whl
(238.2 kB
view hashes)
Close
Hashes for manim_express-0.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59d661825c932fcf952f93c6f9cf3621e6f2a154e625d2ca79841743bb738d71 |
|
MD5 | d7b6eef67f14c23cb9bc6e27ab9317d0 |
|
BLAKE2b-256 | ae0603172d92eb187a8e479650120a27610af7debee650b8bc8c2865a99d4bcc |