ManimCommunity / ManimCommunity/manim
add_tip() changes shape of ArcBetweenPoints
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
When using a `CurvedArrow`, or an `ArcBetweenPoints` with a tip added to it, which is essentially the same, the arc changes shape because of the tip. You can see that the arc doesn't match the circle.

This is due to `line 140 in geometry.py -> TipableVMobject -> add_tip()`:
`self.reset_endpoints_based_on_tip(tip, at_start)`
This line is needed so the arc doesn't overlap with the tip, but it changes the arc's shape. Some logic and arithmetic could be added to fix this issue.
Here's how it looks with line 140 removed/commented:

You can see the arc remains the same, but the end of the line overlaps with the tip.
## Expected behavior
I would expect the arc's shape to remain unchanged.
## How to reproduce the issue
Code to reproduce the issue
```py
class Bug(Scene):
def construct(self):
circ = Circle(radius=2, color=WHITE).shift(LEFT*3)
curv = CurvedArrow(circ.get_right(), circ.get_top(), color=ORANGE, tip_length=.1)
circ2 = Circle(radius=3, color=WHITE).shift(RIGHT*3)
arc = ArcBetweenPoints(circ2.get_right(), circ2.get_top(), color=ORANGE).add_tip(tip_length=.1)
self.add(circ, curv, circ2, arc)
```
## 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
Reproduce the issue with the CurvedArrow and ArcBetweenPoints examples in the report, then inspect geometry.py around TipableVMobject.add_tip() and reset_endpoints_based_on_tip(). Determine how the tip adjustment changes the arc and verify that the arc keeps its original shape without overlapping the tip.
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
- 45/100