Skip to content

Commit 64ab9ad

Browse files
Optimized manim.utils.bezier.get_smooth_cubic_bezier_handle_points() (#3767)
* Optimized manim.utils.get_smooth_cubic_bezier_handle_points() * Fixed typo in docstring regarding vector u * Add tests for get_smooth_cubic_bezier_handle_points * Fix backreference in test docstrings Co-authored-by: adeshpande <[email protected]> --------- Co-authored-by: adeshpande <[email protected]>
1 parent 0d21a7e commit 64ab9ad

File tree

3 files changed

+555
-148
lines changed

3 files changed

+555
-148
lines changed

manim/mobject/types/vectorized_mobject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from manim.utils.bezier import (
3232
bezier,
3333
bezier_remap,
34-
get_smooth_handle_points,
34+
get_smooth_cubic_bezier_handle_points,
3535
integer_interpolate,
3636
interpolate,
3737
partial_bezier_points,
@@ -1093,7 +1093,7 @@ def change_anchor_mode(self, mode: Literal["jagged", "smooth"]) -> Self:
10931093
# The append is needed as the last element is not reached when slicing with numpy.
10941094
anchors = np.append(subpath[::nppcc], subpath[-1:], 0)
10951095
if mode == "smooth":
1096-
h1, h2 = get_smooth_handle_points(anchors)
1096+
h1, h2 = get_smooth_cubic_bezier_handle_points(anchors)
10971097
else: # mode == "jagged"
10981098
# The following will make the handles aligned with the anchors, thus making the bezier curve a segment
10991099
a1 = anchors[:-1]

0 commit comments

Comments
 (0)