Thanks to manim, the great math print lib.
Thanks to 为什么连杆可以画出曲线, the great Popular Science video for linkage.
-
Run the linkages by
manimgl <source> <scene>
like:manimgl main.py Linkage0
-
Generate mp4
manimgl -w main.py PeaucellierLinkage
-
Generate gif
ffmpeg -i videos/PeaucellierLinkage.mp4 out.gif
See TODO in codes.
- 优化代码结构
- 初始状态与运行时统一
- color red: the driver, move around a circle.
- color yellow: point that will be driven.
- color blue: fixed point.
- color green: driven point used to draw the locus.