-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
-
Description of bug / unexpected behavior
manim version: 0.18.0
class SectorArcCenterRotate(Scene):
def construct(self):
self.add(NumberPlane())
sector = Sector(outer_radius=2, start_angle=0, angle=PI / 6)
sector.shift(LEFT * 3)
self.add(sector)
self.wait()
self.add(sector.copy().set_color(RED).set_opacity(0.5))
sector.rotate(PI / 6, about_point=sector.get_arc_center()) # unexcepted
# sector.rotate(PI / 6, about_point=deepcopy(sector.get_arc_center()))
self.wait()Expected behavior
System specifications
System Details
- OS (MacOS 14.2.1 (23C71)): - RAM: - Python version 3.11.5 - Installed modules (provide output from `pip list`):I think the "problem" is get_arc_center return a reference of Sector's point:
manim/manim/mobject/geometry/arc.py
Lines 381 to 392 in 3b496ea
| def get_arc_center(self, warning: bool = True) -> Point3D: | |
| """Looks at the normals to the first two | |
| anchors, and finds their intersection points | |
| """ | |
| # First two anchors and handles | |
| a1, h1, h2, a2 = self.points[:4] | |
| if np.all(a1 == a2): | |
| # For a1 and a2 to lie at the same point arc radius | |
| # must be zero. Thus arc_center will also lie at | |
| # that point. | |
| return a1 |
But the other method, such as get_corner return a copy.
Not sure it's a feature or a bug. Thanks.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New

