ManimCommunity / ManimCommunity/manim
Artifacts/false discontinuities in `ImplicitFunction`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
Looking closely at the output from `ImplicitFunction` you'd often see many false discontinuities. For example, if you look closely at [the example from the docs](https://docs.manim.community/en/stable/reference/manim.mobject.functions.ImplicitFunction.html#implicitfunctionexample), you'd see many points where the curve breaks.
In this example:
```py
class ImplicitFunctionDemo(Scene):
def construct(self):
plane = NumberPlane()
curve = ImplicitFunction(
lambda x, y: (x**2 + y**2)**2 - 42*(x**2 - y**2),
color=YELLOW,
max_quads=10000,
)
self.add(plane)
self.add(curve)
```
even with 10000 quads, discontinuities can still be seen:

## Expected behavior
## How to reproduce the issue
Code for reproducing the problem
```py
Paste your code here.
```
## Additional media files
Images/GIFs
## Logs
Terminal output
```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```
## System specifications
System Details
- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
```
PASTE HERE
```
LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
FFMPEG
Output of `ffmpeg -version`:
```
PASTE HERE
```
## Additional comments
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.
Research direction
Start by locating the `ImplicitFunction` implementation and reproduce the documentation example with `max_quads=10000`. Trace how the curve is sampled and rendered, then verify that the false discontinuities are gone in the same example; the issue names no specific test, file, or system details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100