ManimCommunity / ManimCommunity/manim
Refactoring Math in Manim. Mobject types less intertwined
@MrDiver is already working on this.
Since Dec 27, 2022.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
There are many occurences in the Code where mobjects of different types are misused for their points. Don't get me wrong i think reusing code is perfectly fine but i think the generating of points should be a Math function instead of a Mobject which is deleted afterwards.
I would propose to move all of this code to a seperate module which has functions for generating points or doing math. That makes the mobjects much more independent of each other. For example the `Line` mobject currently depends on `Arc` and `ArcBetweenPoints` for their points.
Im not sure where the right place would be to store those math functions because we have a lot of stuff in `utils/` i would maybe suggest finding a place there.
https://github.com/ManimCommunity/manim/blob/c4b40ed138c4b895ce433e68f719f628e823e293/manim/mobject/geometry/polygram.py#L188-L211
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.