mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 22:13:30 +08:00
Beginning chapter 11 animations
This commit is contained in:
@ -234,7 +234,7 @@ class VMobject(Mobject):
|
||||
def point_from_proportion(self, alpha):
|
||||
num_cubics = self.get_num_anchor_points()-1
|
||||
interpoint_alpha = num_cubics*(alpha % (1./num_cubics))
|
||||
index = 3*int(alpha*num_cubics)
|
||||
index = min(3*int(alpha*num_cubics), 3*num_cubics)
|
||||
cubic = bezier(self.points[index:index+4])
|
||||
return cubic(interpoint_alpha)
|
||||
|
||||
|
Reference in New Issue
Block a user