A community-maintained Python framework for creating mathematical animations.
Fixed projection
Grant Sandersondaffec0034ab
diff --git a/camera/three_d_camera.py b/camera/three_d_camera.pyindex bd3a72f13..2e0fb91e1 100644--- a/camera/three_d_camera.py+++ b/camera/three_d_camera.py@@ -156,8 +156,8 @@ class ThreeDCamera(Camera):points -= fcrot_matrix = self.get_rotation_matrix()points = np.dot(points, rot_matrix.T)- zs = points[:, 2]- points[:, 0] *= (distance + zs) / distance- points[:, 1] *= (distance + zs) / distance+ zs = np.clip(points[:, 2], -np.inf, distance - 0.001)+ for i in 0, 1:+ points[:, i] *= distance / (distance - zs)points += fcreturn points