To see what makes 3-D rotation so much harder, lets compare two actions "turning a steering wheel" with "a spinning globe". All the points on the wheel move together in the same way, so they’re being multiplied by the same (complex) number. But points on the globe move fastest around the equator and slower as you move north or south. Crucially, the poles don’t change at all. If 3-D rotations worked like 2-D rotations every point would move. The solution, which a giddy Hamilton famously carved into Dublin’s Broome Bridge when it finally hit him on October 16, 1843, was to stick the globe into a larger space where rotations behave more like they do in two dimensions. With not two but three imaginary axes, i, j and k, plus the real number line a, Hamilton could define new numbers that are like arrows in 4-D space. He named them “quaternions".
My research suggests that Quaternions have a better "numerical stability" (numerical stability comes into play when we join a series of rotations - for example in rotational animations. Rotation matrices in general tend to degenerate earlier than quaternions do. The computations to force the respective constraints are more complex for matrices than for quaternions). A rotation in 3D has 3 degrees of freedom. So a rotation matrix consists of 9 values, 9 - 3 = 6 constraints are needed. These are: all vectors of the matrix are normalized and that they are pairwise orthogonal. A quaternion consists of 4 values and hence needs 4 - 3 = 1 constraint - it has to be a unit quaternion to represent a pure rotation. You can learn more about rotationrepresentations here.. ( talks about matrix representation, axis-angle representation, quaternion representation and about interpolation too ).
Nice! Youtubers! Lin-Manuel Miranda would be proud.
If you are confused by the equation i^2 = j^2 = k^2 = ijk = -1 , go to the next video. The reason it looks so weird is because you lose the commutative property when you go from 2D rotation to 3D rotation, the property stating that ab = ba .
This means that the order of multiplication matters, and that if you reorder them, you get a different result.
One thing that makes quaternions so challenging is that they live and act in four dimensions, which is extremely hard (impossible?) to visualize. Luckily, we can build an intuition for quaternion multiplication and how it computes rotation in 3d just by focusing on unit quaternions, the ones which sit a distance 1 from the origin. https://eater.net/quaternions
Here we can see how euler's "rotation order" is a bit like hierachies, and how changing this order can help us to avoid gimbal problems. This is demonstrated with a solution to a common camera problem, by finding the correct rotation order.
The term "gimbal lock" comes from the mechanical world. So "gimbal lock" doesn't mean that there are rotations that can't be expressed as Euler angles.
We sure can express any rotation in Euler angle form. Given an object, we can convert its orientation to Euler angles, and from that orientation we can rotate the object however we like and convert the new orientation to other Euler angles. On the flip side - in the (virtual) computer world, there is really nothing that gets "locked".
Instead, the problem is this: when the Euler angles have particular values, there are orientations that are very similar to the current orientation which can't be achieved by just making small changes to the Euler angles. This happens when one of the angles is at 90 degrees, so that two rotation axes coincide. So even though the orientations are "close" in the real world, they are not close in the Euler representation. In fact, at least one of the Euler angles will have to flip 180 degrees in order for us to represent the new orientation.
"4th Gimbal for Christmas!" Apollo 11 Command Module Pilot Michael Collins asked for a fourth gimbal for Christmas, while looking for the lunar ascent module. (Original transcript and the source from NASA is to the right here :: )
:: How ::
The IMU consists of a platform isolated from vehicle rotations by four gimbals. Since the platform does not rotate with the vehicle, its orientation remains fixed, or inertial, in space. The gimbal order from outermost to innermost is outer roll, pitch, inner roll, and azimuth. The platform is attached to the azimuth gimbal. The inner roll gimbal is a redundant gimbal used to provide an all-attitude IMU, while preventing the possibility of gimbal-lock (a condition that can occur with a three-gimbal system and can cause the inertial platform to lose its reference). The outer roll gimbal is driven from error signals generated by disturbances to the inner roll gimbal. Thus, the inner roll gimbal will remain at its null position, orthogonal to the pitch gimbal.
Surprisingly, because of the long lead time required for Apollo development, and the position of Gemini as a second-generation improvement over Mercury, there are a handful of features in Gemini that are more sophisticated than their Apollo equivalents. (Don't know if this is one of them, or if a 4-gimbal system was considered and rejected for Apollo due to weight considerations).
TEXT ON THE PLAQUE SAYS:" Here as he walked by on the 16th of October 1843 Sir William Rowan Hamilton in a flash of genius discovered the fundamental formula for quaternion multiplication
i2 = j2 = k2 = ijk = -1
& cut it on a stone of this bridge".
1 of 6: 'Alexander Hamilton' style!
2 OF 6: fANTASTIC QUATERNIONS !
3 of 6: extra! extra !
4 of 6 : Quaternios visualized
5 OF 6: 3d ROTATION EXPLAINED !
6 OF 6: euler angles and gimbal lock explained ::
One example of gimbal lock incident happened during the Apollo 11 moon mission the Gimbal lock on Apollo was possible with the inner and outer gimbal lying on the same plane, the gimbal mounted on the central platform and the one mounted to the spacecraft. Those are the two you really don't want to line up. [ Image Below ]
Side Note :: A fourth gimbal for Apollo was infact was considered by MIT in 1963. A paper by MIT ( referenced above) about Apollo IMU gimbal lock. (See "5. Considerations of a Four Degree of Freedom IMU"). Suggests that weight is not the only reason, a system with four gimbals would need more electric power and heat transfer problems are increased.
THE TETRACTYS - W.R. Hamilton -
Or high Mathesis, with her charm severe, Of line and number, was our theme; and we Sought to behold her unborn progeny, And thrones reserved in Truth's celestial sphere: While views, before attained, became more clear; And how the One of Time, of Space the Three, Might, in the Chain of Symbol, girdled be: And when my eager and reverted ear Caught some faint echoes of an ancient strain, Some shadowy outlines of old thoughts sublime, Gently he smiled to see, revived again, In later age, and occidental clime, A dimly traced Pythagorean lore, A westward floating, mystic dream of FOUR.