mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 13:34:19 +08:00
Add angle check in addition to use_simple_quadratic_approx
This commit is contained in:
@ -471,7 +471,8 @@ class VMobject(Mobject):
|
|||||||
# Otherwise, approximate with two
|
# Otherwise, approximate with two
|
||||||
v1 = handle1 - last
|
v1 = handle1 - last
|
||||||
v2 = anchor - handle2
|
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]
|
quadratic_approx = [last, find_intersection(last, v1, anchor, -v2), anchor]
|
||||||
else:
|
else:
|
||||||
quadratic_approx = get_quadratic_approximation_of_cubic(
|
quadratic_approx = get_quadratic_approximation_of_cubic(
|
||||||
|
Reference in New Issue
Block a user