mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
First scene of eoc/chapter3
This commit is contained in:
@ -345,14 +345,16 @@ class VMobject(Mobject):
|
||||
return self
|
||||
self.mark_paths_closed = False
|
||||
num_cubics = mobject.get_num_anchor_points()-1
|
||||
lower_index = int(a*num_cubics)
|
||||
upper_index = int(b*num_cubics)
|
||||
lower_index = np.floor(a*num_cubics)
|
||||
upper_index = np.ceil(b*num_cubics)
|
||||
points = np.array(
|
||||
mobject.points[3*lower_index:3*upper_index+4]
|
||||
)
|
||||
if len(points) > 1:
|
||||
a_residue = (num_cubics*a)%1
|
||||
b_residue = (num_cubics*b)%1
|
||||
if b == 1:
|
||||
b_residue = 1
|
||||
points[:4] = partial_bezier_points(
|
||||
points[:4], a_residue, 1
|
||||
)
|
||||
|
Reference in New Issue
Block a user