Skip to content

Commit 68d33d9

Browse files
author
Clar Fon
authored
Make CubicBezier explicitly accept four points (#1043)
1 parent ad9789a commit 68d33d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

manim/mobject/geometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,14 +924,14 @@ def construct(self):
924924
p2b = p2 - [1, 0, 0]
925925
d2 = Dot(point=p2).set_color(RED)
926926
l2 = Line(p2, p2b)
927-
bezier = CubicBezier([p1b, p1b + 3 * RIGHT, p2b - 3 * RIGHT, p2b])
927+
bezier = CubicBezier(p1b, p1b + 3 * RIGHT, p2b - 3 * RIGHT, p2b)
928928
self.add(l1, d1, l2, d2, bezier)
929929
930930
"""
931931

932-
def __init__(self, points, **kwargs):
932+
def __init__(self, start_anchor, start_handle, end_handle, end_anchor, **kwargs):
933933
VMobject.__init__(self, **kwargs)
934-
self.set_points(points)
934+
self.set_points([start_anchor, start_handle, end_handle, end_anchor])
935935

936936

937937
class Polygon(VMobject):

0 commit comments

Comments
 (0)