Animation engine for explanatory math videos
Project description
manim_express
Install
pip install manim_express
Run in pycharm
(Find action 'Registry' in PyCharm) named 'run.processes.with.pty' that allows to run Python processes with tty
Quick start
-
Render an animation: 3b1b:SquareToCircle
from manimlib import * from manim_express import GlEagerScene scene = GlEagerScene() circle = Circle() circle.set_fill(BLUE, opacity=0.5) circle.set_stroke(BLUE_E, width=4) square = Square() scene.show_creation(square) scene.play(ReplacementTransform(square, circle)) scene.hold_on()
Operating graphics:
- hold down the
d
key ormouse left
on the keyboard and move the mouse to change the three-dimensional perspective. - hold down the
s
key ormouse right
on the keyboard and move the mouse to pan the screen - hold down the
z
orctrl
on the keyboard while scrolling the middle mouse button to zoom the screen - scroll the middle mouse button to move the screen up and down
- reset camera view by pressing
r
- close the window and exit the program by pressing
q
ortab
- pause the animation by pressing
space
orctrl
oralt
- previews animation clip by pressing
LEFT
- next animation clip:
RIGHT
- replay current animation clip:
DOWN
- hold down the
-
manim_express
vsMatplotlib
:
Eager mode usage:from manimlib import * from manim_express import GlEagerScene CONFIG.use_online_tex = True # If you don't have installed latex locally. theta = np.linspace(0, 2*np.pi, 200) x = np.cos(theta) y = np.sin(theta) scene = GlEagerScene() scene.plot(x, y, color=GREEN, width=2, scale_ratio=1) scene.show_plot() scene.hold_on()
Object oriented usage:
from manimlib import * from manim_express import GlEagerScene from sklearn.datasets import make_multilabel_classification class ScatterExample(GlEagerScene): def clip_1(self): X1, y1 =make_multilabel_classification(n_samples=200, n_classes=4, n_features=2) X2, y2 =make_multilabel_classification(n_samples=200, n_classes=4, n_features=2) self.scatter2d(X1[:, 0], X1[:, 1], size=.05, color=BLUE) self.scatter2d(X2[:, 0], X2[:, 1], size=.05, color=YELLOW) ScatterExample().render()
It should be noted that manim is not suitable for drawing patterns that need to be accurately realized!
Resources
-
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 -
export pptx
Examples
-
Bezier curve
-
GOA model
-
GOA
-
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.6.8.tar.gz
(18.0 MB
view hashes)
Built Distribution
Close
Hashes for manim_express-0.6.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc451d7d0b56203e9e3053ae0c4555853bc4cbc9f1d6a417b91b472df7faa2bf |
|
MD5 | 549cfc16763edb864a7a9f8ce038cbe1 |
|
BLAKE2b-256 | c6fc4cc5365135b550503315d35daddca28ad7c4aa03dc9bb94fc26d164f4474 |