mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
In get_euler_angles, add edge case for gimbal lock on the low side
This commit is contained in:
parent
0a43a3ff9a
commit
bc91e91634
1 changed files with 3 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue