Ejemplo n.º 1
0
 def get_nth_curve_function(self, n):
     return bezier(self.get_nth_curve_points(n))
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def get_nth_curve_function(self, n: int) -> Callable[[float], np.ndarray]:
     return bezier(self.get_nth_curve_points(n))
Ejemplo n.º 4
0
 def get_nth_curve(self, n):
     return bezier(self.points[3 * n:3 * n + 4])
Ejemplo n.º 5
0
def running_start(t, pull_factor=-0.5):
    return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)
Ejemplo n.º 6
0
def running_start(t: float, pull_factor: float = -0.5) -> float:
    return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)
Ejemplo n.º 7
0
 def get_nth_curve_function(self, n):
     return bezier(self.get_nth_curve_points(n))
Ejemplo n.º 8
0
def running_start(t, pull_factor=-0.5):
    return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)