from scipy import linalg import numpy as np from manimlib.utils.simple_functions import choose_using_cache from manimlib.utils.space_ops import get_norm CLOSED_THRESHOLD = 0.001 def bezier(points): n = len(points) - 1 return lambda t: sum([ ((1 - t)**(n - k)) * (t**k) * choose_using_cache(n, k) * point for k, point in enumerate(points) ]) def partial_bezier_points(points, a, b): """ Given an array of points which define a bezier curve, and two numbers 0<=a