Manim: Animation engine for explanatory math videos
github.com
github.com
Here's a snippet to trace out a rotating rectangle:
do s <- fork $ newSpriteA drawBox
v <- spriteVar s 0 rotate
tweenVar v 2 $ \val -> fromToS val 90
The API docs[2] have a bunch of small examples like this illustrated with inline gifs, which I think is a great touch.[1]: https://github.com/reanimate/reanimate
[2]: https://hackage.haskell.org/package/reanimate-1.1.2.1/docs/R...
For example, parLoopA and parDropA seem to have the same sample code, but have different animations.
After a bit of playing around, here is a simple video (with linked source) of using Manim (the community edition) to generate a quick walkthrough:
https://www.youtube.com/watch?v=i-pvpQsZD_I
Most of this could also be created via an editor like DaVinci Resolve, but the programmer in me likes the consistency and flexibility of a code-driven video.
Once I found out about Code, I'd say probably 15 minutes to land on the opacity strategy and a few minutes to learn how to control the camera, so in the end, not bad. The limiting factor is now figuring out what I want it to do in the first place.
[0]: https://xkcd.com/1053/ [1]: https://www.youtube.com/channel/UCYO_jab_esuFRV4b17AJtAw
https://computationalthinking.mit.edu/Fall20/
He also had a nice video about epidemics/pandemics: https://www.youtube.com/watch?v=gxAaO2rsdIs
All using manim for visualizations.
Also is there a comparable tools that do such interactive math animation in 3d.