示例#1
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)
示例#2
0
 def get_nth_curve(self, n):
     return bezier(self.points[3 * n:3 * n + 4])
示例#3
0
def running_start(t, pull_factor=-0.5):
    return bezier([0, 0, pull_factor, pull_factor, 1, 1, 1])(t)
 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(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)