Skip to content

Commit

Permalink
revert to previous (new) version
Browse files Browse the repository at this point in the history
  • Loading branch information
behackl committed Nov 2, 2023
1 parent 4fed4af commit ad228f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions manim/mobject/opengl/opengl_vectorized_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,14 +1284,17 @@ def insert_n_curves_to_point_list(self, n: int, points: np.ndarray) -> np.ndarra
for _ in range(-diff):
ipc[np.argmax(ipc)] -= 1

new_points = []
new_length = sum(x + 1 for x in ipc)
new_points = np.empty((new_length, nppc, 3))
i = 0
for group, n_inserts in zip(bezier_groups, ipc):
# What was once a single quadratic curve defined
# by "group" will now be broken into n_inserts + 1
# smaller quadratic curves
alphas = np.linspace(0, 1, n_inserts + 2)
for a1, a2 in zip(alphas, alphas[1:]):
new_points += partial_quadratic_bezier_points(group, a1, a2)
new_points[i] = partial_quadratic_bezier_points(group, a1, a2)
i = i + 1
return np.vstack(new_points)

def interpolate(self, mobject1, mobject2, alpha, *args, **kwargs):
Expand Down

0 comments on commit ad228f1

Please sign in to comment.