def get_nth_curve_function(self, n): return bezier(self.get_nth_curve_points(n))
def point_from_proportion(self, alpha): num_cubics = self.get_num_anchor_points() - 1 interpoint_alpha = num_cubics * (alpha % (1. / num_cubics)) index = min(3 * int(alpha * num_cubics), 3 * num_cubics) cubic = bezier(self.points[index:index + 4]) return cubic(interpoint_alpha)
def get_nth_curve_function(self, n: int) -> Callable[[float], np.ndarray]: return bezier(self.get_nth_curve_points(n))
def get_nth_curve(self, n): return bezier(self.points[3 * n:3 * n + 4])
def running_start(t, pull_factor=-0.5): return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)
def running_start(t: float, pull_factor: float = -0.5) -> float: return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)