-
Notifications
You must be signed in to change notification settings - Fork 2.5k
ArcBetweenPoints fix/enhancement #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mobject.py has been slightly changed to fix an issue where points that weren't passed into ArcBetweenPoints as np.array caused manim to fail. geometry.py had ArcBetweenPoints adjusted to support radius instead of angle. Small changes to Arc were necessary to facilitate that .radius returns correct values at all times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Made only minor comments (that will be caught by black once that is in place), so I'm approving this.
manim/mobject/geometry.py
Outdated
| # Normals | ||
| n1 = rotate_vector(t1, TAU / 4) | ||
| n2 = rotate_vector(t2, TAU / 4) | ||
| self.failed_to_get_center=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be declared in init, or made a private attr (with _failed_to_get_center)?
manim/mobject/geometry.py
Outdated
| def __init__(self, start_angle=0, angle=TAU / 4, **kwargs): | ||
| self.start_angle = start_angle | ||
| self.angle = angle | ||
| self.failed_to_get_center=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| self.failed_to_get_center=False | |
| self._failed_to_get_center=False |
The motivation for making this change (Work on ArcBetweenPoints #40)
mobject.py has been slightly changed to fix an issue where points that weren't passed into ArcBetweenPoints as np.array caused manim to fail.
geometry.py had ArcBetweenPoints adjusted to also support radius instead of just angle. Small changes to Arc were necessary to facilitate that .radius returns correct values at all times.
How you tested the new behavior: