mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 02:35:22 +08:00
In get_euler_angles, add edge case for gimbal lock on the low side
This commit is contained in:
@ -74,6 +74,9 @@ class CameraFrame(Mobject):
|
||||
if np.isclose(angles[1], 0, atol=1e-2):
|
||||
angles[0] = angles[0] + angles[2]
|
||||
angles[2] = 0
|
||||
if np.isclose(angles[1], PI, atol=1e-2):
|
||||
angles[0] = angles[0] - angles[2]
|
||||
angles[2] = 0
|
||||
return angles
|
||||
|
||||
def get_theta(self):
|
||||
|
Reference in New Issue
Block a user