5 ms·
Hmm, I usually find polar coordinates harder to reason with due to the gimbal lock :) In 2D there's no gimbal lock of course, but there's still a number that b
by Aardwolf 3y ago
Hmm, I usually find polar coordinates harder to reason with due to the gimbal lock :)
In 2D there's no gimbal lock of course, but there's still a number that behaves differently than the others, the angle wrapping around in range 0..2pi!
And of course the article is about fast computation of sin/cos so the option of not computing it should be considered
- thehappypm 3y agoCan you explain gimbal lock? I can’t wrap my head around it
- Aardwolf 3y agoThe main thing is how when representing the 3D looking orientation as multiple angles (pitch=up/down, yaw=compass direction), you lose control over the yaw axis when looking straight up.
- pacaro 3y agoOf course gimbal lock is a thing, and there are ways to avoid it, even without quaternions, but I'm curious as to when it should be avoided. I think that gamers are now so used to it, that removing it might cause more problems than it solves
- Aardwolf 3y agoI guess that's more for airplane simulators then. But I'd also think any physics engine where things can rotate arbitrarily need to work correctly here. I also think, despite various sources on the internet saying "quaternions are the solution to gimbal lock", that classical 3D vectors and 3D matrices without quaternions also perfectly solve it.
- pacaro 3y agoAgreed absolutely. I've used quaternions when someone else made the decision that was what the physics engine was going to do! But when I'm the decision maker it's 3d vectors and matrices all the way
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- thehappypm 3y agoWhy?
- basementcat 3y agoA physical analogy is an azimuth-elevation mounted antenna tracking an object that flies over the zenith. When the object is near the horizon, the angular velocity of the azimuth actuator may be near zero and the elevation actuator may be small. Near zenith, the angular velocity of the elevation actuator may be small and the azimuth actuator may be near infinity.
- thehappypm 3y agoELI10?
- boulos 3y ago> I can’t wrap my head around it Pun intended?
- midjji 3y agoThe equivalent of polar coordinates in 3d are quaternions. Which do not have gimbal lock, the problem only occurs for euler angles(which should never ever be used for anything ever).
- messe 3y ago> The equivalent of polar coordinates in 3d are quaternions I’d disagree. Quaternions are the 3D equivalent (yes, I’m aware of the subtleties here, but speaking in a rough sense) to using complex numbers to represent rotations. Euler angles are much closer in spirit to polar coordinates, but unfortunately have gimbal lock.
- midjji 3y agoA single number to represent a rotation in 2D, vs a single number to represent rotations in 4D for which 2D, and 3D are special cases. Compared to 3 numbers and a series of operations which happen to rotate a 3D vector. Regardless I think euler angles should not be taught except as a dont do this, its a bad idea. Mostly because when used in practice, in order to interpret them you must convert them to quaternion to do so, which is very telling. Gimbal lock is a secondary problem to that.