ManimCommunity / ManimCommunity/manim

Refactoring Math in Manim. Mobject types less intertwined

Open
#3,096 0 comments 0 reactions 1 assignee View on GitHub

@MrDiver is already working on this.

Since Dec 27, 2022.

experimental maintenance needs discussion refactor
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.