mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 21:12:35 +08:00
Fixed flashing 3d dot problem
This commit is contained in:
@ -38,11 +38,11 @@ def get_3d_vmob_unit_normal(vmob, point_index):
|
||||
if len(vmob.get_anchors()) <= 2:
|
||||
return np.array(UP)
|
||||
i = point_index
|
||||
im1 = i - 1 if i > 0 else (n_points - 2)
|
||||
ip1 = i + 1 if i < (n_points - 1) else 1
|
||||
im3 = i - 3 if i > 2 else (n_points - 4)
|
||||
ip3 = i + 3 if i < (n_points - 3) else 3
|
||||
unit_normal = get_unit_normal(
|
||||
vmob.points[ip1] - vmob.points[i],
|
||||
vmob.points[im1] - vmob.points[i],
|
||||
vmob.points[ip3] - vmob.points[i],
|
||||
vmob.points[im3] - vmob.points[i],
|
||||
)
|
||||
if get_norm(unit_normal) == 0:
|
||||
return np.array(UP)
|
||||
|
Reference in New Issue
Block a user