Add angle check in addition to use_simple_quadratic_approx

This commit is contained in:
Grant Sanderson
2023-01-12 23:58:43 -08:00
parent aa8fba5b02
commit a12b5cca67

View File

@ -471,7 +471,8 @@ class VMobject(Mobject):
# Otherwise, approximate with two
v1 = handle1 - last
v2 = anchor - handle2
if self.use_simple_quadratic_approx:
angle = angle_between_vectors(v1, v2)
if self.use_simple_quadratic_approx and angle < 45 * DEGREES:
quadratic_approx = [last, find_intersection(last, v1, anchor, -v2), anchor]
else:
quadratic_approx = get_quadratic_approximation_of_cubic(