mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Don't even try to display points with nan or infinity
This commit is contained in:
parent
e0d6bd5449
commit
8a1f121207
1 changed files with 2 additions and 0 deletions
|
@ -341,6 +341,8 @@ class Camera(object):
|
|||
points = self.transform_points_pre_display(
|
||||
vmob, vmob.points
|
||||
)
|
||||
if np.any(np.isnan(points)) or np.any(points == np.inf):
|
||||
points = np.zeros((1, 3))
|
||||
ctx.new_sub_path()
|
||||
ctx.move_to(*points[0][:2])
|
||||
for triplet in zip(points[1::3], points[2::3], points[3::3]):
|
||||
|
|
Loading…
Add table
Reference in a new issue