Manim 2.0?
See original GitHub issueThere seems to be quite a lot of maintainability issues with the current Manim and areas which don’t make full use of features of the python language but fixing them would basically require a rewrite of the codebase. Here are a few of the potential areas for improvement I have found:
-
There’s lot of getter and setter functions in which should be properties
-
Using a python based latex compiler such as PyLaTeX would help decrease non-python dependencies. It would be nice if we could eliminate all non-python deps to simplify the install process although I’m not sure if that’s practical.
-
Using the new pipfile standard to manage python dependencies.
-
imports.py
should be__init__.py
and__init__.py
should be__main__.py
-
#609 split it modules. A lot of Manim is only required for specific use cases which is inevitable for it’s use but that code should be split into modules based on functionality which the user can chose whether to be imported or not. E.g. if #764 is merged, then it should have it’s own module called
physics
. This would also allow for large files to be split up (not to pick on #764 but it’s good as it shows how much effort currently needs to be done to implement new objects) e.gpsychics.py
could be split intoparticle.py
andpendulum.py
inside thephysics
module. -
Configuration management could be done much the same way as flask, through a single object called
Config
which parses say a yaml file then all the other modules can import the config and use it like a dictionary e.gconfig['CAMERA_QUALITY']
to get values instead of having functions such asget_camera_configuration()
.
The end goal of all of this is to abstract and automate as much of the internal stuff away from the module writers as well as users to make the code clean and readable.
Although these changes would break a lot of existing code using the library thus something that needs to be decided by the community whether it’s worth it.
If you have any other suggestions for changes that would be suitable for a 2.0. Please comment on this issue. It would be nice to start compiling a list.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:12
- Comments:16 (7 by maintainers)
Top GitHub Comments
For anyone who may be watching here and not on the Manim Discord, a small team has been assembled to create a community version of Manim. https://github.com/ManimCommunity/manim
The good in using Python is its wide range of math- and science-related libraries, such as
numpy
. That will definitely be a huge point to consider when porting manim to any other language, noting that there are math libraries in most, if not all, languages, but most don’t even come close to the Python languages’ power. This requires being pondered at, considering there are many complex manim projects out there (by other people than 3b1b, but also his own projects) that simply depend on this.