Rotations, in various contexts, describe circular movements or the act of regularly changing something. In mathematics, physics, and everyday applications, seve...
Rotations, in various contexts, describe circular movements or the act of regularly changing something. In mathematics, physics, and everyday applications, several types of rotations exist, each serving unique purposes. Let's explore these types, starting with the most fundamental.

Rotations, at their core, involve turning an object around a fixed point called the center of rotation. The distance from the center to the object is critical, as it determines the object's angular displacement, a central concept in understanding rotations.

Planar rotations occur in two dimensions and are defined by a specific angle and a fixed point, the center of rotation. These rotations are common in geometry, computer graphics, and everyday situations like turning a steering wheel.

The angle of rotation can be measured in various units, but in mathematics, it's typically expressed in radians or degrees. The direction of rotation can be counterclockwise (positive) or clockwise (negative).

Rotations by 90 degrees, or quarter turns, are special cases, widely used in geometry and computer programming. A 90-degree rotation results in one of the four basic functions: sin, cos, tan, or cot, depending on the starting angle and direction.
For example, rotating 90 degrees counterclockwise around the origin in the Cartesian plane results in the function (x, y) → (y, -x), corresponding to the rotation matrix [[0, 1], [-1, 0]]

Rotations by any angle θ around the origin can be represented using the rotation matrix [[cos(θ), -sin(θ)], [sin(θ), cos(θ)]]. This matrix, when multiplied by the position vector (x, y), yields the new position after rotation.
In computer graphics, 2D rotations are often represented using complex numbers, taking advantage of their ability to perform multiplication and division elegantly in polar coordinates. The rotation of (x, y) by an angle θ in radians is given by (x + yi) * e^(iθ).

Spatial, or 3D, rotations occur in three dimensions and are defined by an axis of rotation, an angle, and a direction. These rotations are prevalent in physics, engineering, and computer graphics, describing the movement of objects in space.
The most common representation of a spatial rotation is using a set of three angles, called Euler angles, which can describe any 3D rotation. However, this representation can have issues with singularities (points where the rotation cannot be uniquely defined).






Euler angles (φ, θ, ψ) describe a rotation in three steps: first around the z-axis by an angle φ, then around the new x-axis by an angle θ, and finally around the new z-axis by an angle ψ. The rotation matrix is then given by R_z(ψ) * R_x(θ) * R_z(φ).
Alternatively, we can use Active Euler angles or Passive Euler angles, which differ in the order of rotations and the range of angles. Each method has its advantages and disadvantages, and care must be taken to avoid singularities and gimbal lock.
Quaternions, a number system introduced by Sir William Rowan Hamilton, provide another way to represent 3D rotations. A quaternion is a four-dimensional number, written as w + xi + yj + zk, where w, x, y, z are real numbers and i, j, k are the fundamental quaternion units.
A unit quaternion (w^2 + x^2 + y^2 + z^2 = 1) can represent any 3D rotation, with the rotation angle and axis given by 2*arccos(w) and (x, y, z), respectively. Quaternions excel in computer graphics due to their ability to interpolate between rotations and avoid the gimbal lock problem associated with Euler angles.
Understanding the various types of rotations is vital in fields ranging from mathematics and physics to computer graphics and engineering. By mastering planar rotations, 90-degree rotations, and spatial rotations through Euler angles and quaternions, one can effectively describe and manipulate the complex movements that occur in our three-dimensional world. To further explore these concepts, consider delving into specific applications and algorithms, such as those used in computer animation and robotics.