Skip to content

Commit

Permalink
Update arc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CobaltIII authored Dec 29, 2024
1 parent d91f727 commit 6d20506
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions manim/mobject/geometry/arc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def construct(self):
perpendicular_bisector,
rotate_vector,
)
from manim.utils.bezier import (
integer_interpolate,
partial_bezier_points
)

if TYPE_CHECKING:
from collections.abc import Iterable
Expand Down Expand Up @@ -303,6 +307,17 @@ def get_length(self) -> float:
start, end = self.get_start_and_end()
return float(np.linalg.norm(start - end))

def pointwise_become_partial(
self,
vmobject: VMobject,
a: float,
b: float,
) -> Self:
super().pointwise_become_partial(vmobject , a , b)
if isinstance(self, TipableVMobject) and self.has_tip() and a != 0:
self.remove(self.tip)
return self


class Arc(TipableVMobject):
"""A circular arc.
Expand Down

0 comments on commit 6d20506

Please sign in to comment.