Skip to content

Commit b63ecca

Browse files
committed
added documentation
1 parent bcab4b2 commit b63ecca

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

manim/mobject/opengl/opengl_vectorized_mobject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,6 @@ def pointwise_become_partial(
13331333
bezier_triplets[lower_index], lower_residue, 1
13341334
),
13351335
)
1336-
# TODO: replace by smooth_bezier_remap(triplets[li+1:ui], num_quadratics-2) -> [points; len(ui-li+1)] : #2742
13371336
inner_points = bezier_triplets[lower_index + 1 : upper_index]
13381337

13391338
if remap:

manim/utils/bezier.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import typing
2424
from functools import reduce
25-
from typing import Iterable
25+
from typing import Iterable, Sequence
2626

2727
import numpy as np
2828
from scipy import linalg
@@ -175,7 +175,23 @@ def subdivide_quadratic_bezier(points: Iterable[float], n: int) -> np.ndarray:
175175
return np.asarray(beziers).reshape(-1, 3)
176176

177177

178-
def quadratic_bezier_remap(triplets, new_number_of_curves):
178+
def quadratic_bezier_remap(
179+
triplets: Sequence[Sequence[float]], new_number_of_curves: int
180+
):
181+
"""Remaps the number of curves to a higher amount by splitting bezier curves
182+
183+
Parameters
184+
----------
185+
triplets
186+
The triplets of the quadratic bezier curves to be remapped
187+
188+
new_number_of_curves
189+
The number of curves that the output will contain. This needs to be higher than the current number.
190+
191+
Returns
192+
-------
193+
The new triplets for the quadratic bezier curves.
194+
"""
179195
new_triplets = []
180196
difference = new_number_of_curves - len(triplets)
181197
for triplet in triplets:

0 commit comments

Comments
 (0)