mail  mail@stemandmusic.in
    
call  +91-9818088802
Donate

Rotation

  1. Rotations are Non Deformative Transformations. A Rotational Transformation or Rotation refers to the Angular Change in the Position of Coordinate Points of an Object, either because the Object is Rotated or the Coordinate System in which the Object is represented is Rotated.
  2. Rotations in 2, 3 and Higher Dimensions are generally represented in 2, 3 and Higher Dimensional Cartesian Coordinate Systems respectively and are calculated with respect to the Origin of the Coordinate Systems.
  3. Any Rotation in any Dimension always happens by a Clockwise or Counter/Anti Clockwise Rotation Angle Parallel to a Plane OR On the Plane that is defined by 2 Linearly Independent Vectors (i.e. 2 Non-Parallel Vectors) (which is called the Plane of Rotation).

    For 2 and 3 Dimensional Rotations, the Plane of Rotation that is defined by the 2 Non-Parallel Vectors has a Unique Axis Perpendicular to the Plane. An Axis Parallel to the Axis Perpendicular to the Plane passing through the Origin of the Coordinate System around which the 2D/3D Rotations happen is called the Axis of Rotation.

    Also, for 2 Dimensional Rotations, the Plane of Rotation that is defined by the 2 Non-Parallel Vectors is Fixed (which also fixes the Axis of Rotation) and it is the Same Plane in which the Object that is Rotated is represented, which is the Plane defined by the 2 Dimensional Cartesian Coordinate System.
  4. The Rotations On or Parallel to the Coordinate Planes in Any Dimension are called Elementary Rotations.

    Any Arbitrary Rotation On or Parallel to Any Arbitrary Plane in Any Dimension can be given as a Combination of Elementary Rotations.

    Since there are \(C(N,2)\) Coordinate Planes in \(N\)-Dimensions, Any Arbitrary Rotation On or Parallel to Any Arbitrary Plane in \(N\)-Dimension can be given by a Combination of a maximum of \(C(N,2)\) Elementary Rotations.

    Since there is only a Single Coordinate Plane in 2-Dimensions, Any Rotation in 2 Dimension is an Elementary Rotation.

    Since there are 3 Coordinate Planes in 3-Dimensions, any Rotation in 3 Dimension can be given by a Combination of 3 Elementary Rotations. The Angles corresponding to these Elementary Rotations are called Euler Angles or Tait Bryan Angles depending on the Combination of Coordinate Planes used for Rotations.
  5. Rotations of any Object represented in form of a Set of Coordinate Points in \(N\)- Dimensions (where \(N \geq 2\)) is calculated using using \(N \times N\) Rotation Matrices which have following properties
    1. All Rotation Matrices are Orthogonal Square Matrices and have a Determinant Value of 1.
    2. All Rotation Matrices representing a Rotation of \(180^\circ\) are Symmetric.
    3. The Trace of any \(N\)- Dimensional Rotation Matrix \(M\) representing a Rotation of \(\theta\) is calculated as

      \(Trace(M) = (N - 2) + 2\cos\theta\)

      Hence any Orthogonal Square Matrix having a Determinant Value of 1 is a Rotation Matrix only if \(-2 \leq Trace(M) - (N-2) \leq 2\).
  6. Rotation Matrices can be calculated using following inputs
    1. In \(N\)-Dimensions (where \(N \geq 2\)) any \(N\)-Dimensional Rotation Matrix can be calculated when 2 Non-Parallel Vectors specifying the Plane of Rotation and a Angle of Rotation is given. Conversely, given a Rotation Matrix the 2 Non-Parallel Vectors specifying the Plane of Rotation and Angle of Rotation can be calculated.
    2. Rotation Matrix corresponding to Any Arbitrary Rotation on Any Arbitrary Plane in \(N\)-Dimensions can also be calculated as a Product of a maximum of \(C(N,2)\) Rotation Matrices corresponding to Elementary Rotations in \(N\)-Dimensions. Conversely, given a Rotation Matrix the Elementary Rotation and Rotation Matrices corresponding to Elementary Rotations can be calculated.
    3. Since in 3 Dimensions any Plane of Rotation has a Unique Axis Perpendicular to the Plane, any 3D Rotation Matrix can also be calculated using only the Unit Directional Vector for Axis Perpendicular to the Plane (which is same as the Axis of Rotation) and a Angle of Rotation. Conversely, given a 3D Rotation Matrix the Axis of Rotation and the Angle of Rotation can be calculated.
    4. Since in 2 Dimensions the Plane of Rotation is Fixed, any 2D Rotation Matrix can also be calculated using only the Angle of Rotation. Conversely, given a 2D Rotation Matrix the Angle of Rotation can be calculated.
  7. In 3D, Rotation of a Point \(P\) having Position Vector \(\vec{P}\) by an Angle \(\phi\) with respect to an Axis given by Unit Vector \(\hat{n}\) is calculated using the Rodrigues Rotation Formula as follows

    \(\vec{P_R}=(1-\cos \phi)(\vec{P}\cdot \hat{n})\hat{n} + \vec{P} \cos \phi + (\hat{n} \times \vec{P})\sin \phi\)

    where \(\vec{P_R}\) is Position Vector of a Rotated Point.

    The Rodrigues Rotation Formula can be used to Derive the for formula for 3D Rotation Matrix, which can then be used to calculate the 3D Rotation Matrix for any given Axis of Rotation and the Angle of Rotation.

    It is also possible to Calculate 3D Rotation Matrix using Polar and Equatorial Angles of the Axis of Rotation for a given Axis of Rotation and the Angle of Rotation.

    Conversely, it is possible to Find the Axis of Rotation and the Angle of Rotation for any given 3D Rotation Matrix.
  8. The 3D Rotation Matrix can be used for calculating Rotation of any Point in 3D with respect to any Arbitrary Axis given by Unit Vector <X,Y,Z> passing through Origin (0,0,0) as follows

    Rotation TypeRotation Matrix
    For counter clockwise rotation of a point \(\begin{bmatrix} tX^2 + c & tXY - sZ & tXZ + sY\\tXY + sZ & tY^2 + c & tYZ - sX\\tXZ - sY & tYZ + sX & tZ^2 + c\end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
    For clockwise rotation of a point \( \begin{bmatrix} tX^2 + c & tXY + sZ & tXZ - sY\\tXY - sZ & tY^2 + c & tYZ + sX\\tXZ + sY & tYZ - sX & tZ^2 + c\end{bmatrix}\begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
    Where c = cos (\(\phi\)), s = sin (\(\phi\)), t = 1-cos (\(\phi\)), and <X,Y,Z> is the unit vector representing the arbitary axis

  9. By Setting the Unit Vector of the Coordinate Axes (\(X\),\(Y\) or \(Z\)) as the Axis of Rotation in the 3D Rotation Matrix Formula, the 3D Rotation Matrix Corresponding to the Coordinate Axes can be calculated. These Rotation Matrices can be used for calculating Rotation of any Point in 3D with respect to Coordinate Axes (\(X\),\(Y\) or \(Z\)) as follows
    1. Rotation with respect to \(X\) Axis:
      Rotation TypeRotation EquationRotation Matrix
      For counter clockwise rotation of a point/object (clockwise rotation of equation / coordinate system) \(x' = x\)
      \(y' = y \cos(\phi) - z \sin(\phi)\)
      \(z' = z \cos(\phi) + y \sin(\phi)\)
      \(\begin{bmatrix} 1 & 0 & 0 \\ 0 & cos(\phi) & -sin(\phi) \\0 & sin(\phi) & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
      For clockwise rotation of a point/object (counter clockwise rotation of equation / coordinate system) \(x' = x\)
      \(y' = y \cos(\phi) + z \sin(\phi)\)
      \(z' = z \cos(\phi) - y \sin(\phi)\)
      \(\begin{bmatrix} 1 & 0 & 0 \\ 0 & cos(\phi) & sin(\phi) \\0 & -sin(\phi) & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
    2. Rotation with respect to \(Y\) Axis:
      Rotation TypeRotation EquationRotation Matrix
      For counter clockwise rotation of a point/object (clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) + z \sin(\phi)\)
      \(y' = y \)
      \(z' = z \cos(\phi) - x \sin(\phi)\)
      \(\begin{bmatrix}cos(\phi) & 0 & sin(\phi) \\0 & 1 & 0 \\ -sin(\phi) & 0 & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
      For clockwise rotation of a point/object (counter clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) - z \sin(\phi)\)
      \(y' = y\)
      \(z' = z \cos(\phi) + x \sin(\phi)\)
      \(\begin{bmatrix}cos(\phi) & 0 & -sin(\phi) \\0 & 1 & 0 \\ sin(\phi) & 0 & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
    3. Rotation with respect to \(Z\) Axis:
      Rotation TypeRotation EquationRotation Matrix
      For counter clockwise rotation of a point/object (clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) - y \sin(\phi)\)
      \(y' = y \cos(\phi) + x \sin(\phi)\)
      \(z' = z\)
      \(\begin{bmatrix} cos(\phi) & -sin(\phi) & 0 \\sin(\phi) & cos(\phi) & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
      For clockwise rotation of a point/object (counter clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) + y \sin(\phi)\)
      \(y' = y \cos(\phi) - x \sin(\phi)\)
      \(z' = z\)
      \(\begin{bmatrix} cos(\phi) & sin(\phi) & 0 \\-sin(\phi) & cos(\phi) & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
  10. Rotation of any Point in 2D with respect to Origin (0,0) is same as Rotation of any Point in 3D with respect to \(Z\) Axis. Hence, the 2D Rotation Matrix which can be used for calculating Rotation of any Point in 2D with respect to Origin (0,0) is similar to that of 3D Rotation Matrix for Rotation with respect to \(Z\) Axis and is given as follows:

    Rotation TypeRotation EquationRotation Matrix
    For counter clockwise rotation of a point/object (clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) - y \sin(\phi)\)
    \(y' = y \cos(\phi) + x \sin(\phi)\)
    \(\begin{bmatrix} cos(\phi) & -sin(\phi) \\ sin(\phi) & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x' \\ y' \end{bmatrix}\)
    For clockwise rotation of a point/object (counter clockwise rotation of equation / coordinate system) \(x' = x \cos(\phi) + y \sin(\phi)\)
    \(y' = y \cos(\phi) - x \sin(\phi)\)
    \(\begin{bmatrix} cos(\phi) & sin(\phi) \\ -sin(\phi) & cos(\phi) \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x' \\ y' \end{bmatrix}\)


    The formula for Rotation of a Point in 2D can also be calculated as follows

    Let's consider a point (x,y) at a distance d from the origin (0,0). The line joining this point and the origin makes an angle \(\theta\) with the positive direction of x axis. Then the coordinates of the point can be given in terms of the distance d and the angle \(\theta\) as:

    \( x = d \cos(\theta)\)
    \( y = d \sin(\theta)\)

    Now if the point (x,y) is rotated counter clockwise by an angle \(\phi\) then the new point (x',y') shall be given as:

    \( x' = d \cos(\theta + \phi)\)
    \(\Rightarrow x' = d \cos(\theta)\cos(\phi) - d \sin(\theta)\sin(\phi)\)
    \(\Rightarrow x' = x \cos(\phi) - y \sin(\phi)\)

    \( y' = d \sin(\theta + \phi)\)
    \(\Rightarrow y' = d \sin(\theta)\cos(\phi) + d \cos(\theta)\sin(\phi)\)
    \(\Rightarrow y' = y \cos(\phi) + x \sin(\phi)\)

    Similarly, if the point (x,y) is rotated clockwise by an angle \(\phi\) then the new point (x',y') shall be given as:

    \( x' = d \cos(\theta - \phi)\)
    \(\Rightarrow x' = d \cos(\theta)\cos(\phi) + d \sin(\theta)\sin(\phi)\)
    \(\Rightarrow x' = x \cos(\phi) + y \sin(\phi)\)

    \( y' = d \sin(\theta - \phi)\)
    \(\Rightarrow y' = d \sin(\theta)\cos(\phi) - d \cos(\theta)\sin(\phi)\)
    \(\Rightarrow y' = y \cos(\phi) - x \sin(\phi)\)

  11. As given above, the formulae/equations used for Rotating an Object or a Point Clockwise is similar to the formulae/equations used for Rotating the Coordinate System or Equation of the Object Counter Clockwise. Conversely, the formulae/equations used for Rotating an Object or a Point Counter Clockwise is similar to the formulae/equations used for Rotating the Coordinate System or Equation of the Object Clockwise.

    Also, please note that in all above given matrices/formulae/equations the value of Rotation Angle \(\phi \geq 0\). If the value of Rotation Angle \(\phi < 0\) then the matrices/formulae/equations for Counter Clockwise Rotations perform Clockwise Rotations and vice versa.
  12. Any 3D Rotation Matrix representing Rotation by an Arbirary Angle around any Arbirary Axis can be factored into 3 Elementary Rotation Matrices. Each such Elementary Rotation Matrix represents a Rotation Around One of the Coordinate Axes (\(X\), \(Y\)or \(Z\)) by some Angle. The Angles of Rotation corresponding to each such Elementary Rotation Matrix are either called Euler Angles or Tait Bryan Angles depending on the Set of Coordinate Axes used for Rotations.

    Conversely, a 3D Rotation Matrix for any desired 3D Rotation can be obtained by Mutiplying a Set of Elementary Rotation Matrix based on Euler or Tait-Bryan Angles.
  13. Rotation of a Point in 3D with respect any Arbitrary Axis given by Unit Vector <X,Y,Z> passing through any Arbitrary Point \((t_x,t_y,t_z)\) or Rotation of a Point in 2D with respect to any Arbitrary Point \((t_x,t_y)\) on Plane involve Multiple Transformations applied in the following order
    1. Shift the Origin to \((t_x,t_y,t_z)\) in 3D or \((t_x,t_y)\) in 2D.
    2. Apply the Rotation.
    3. Undo the Shifting of Origin, i.e. Shift the Origin Back to \((0,0,0)\) in 3D or \((0,0)\) in 2D.
Related Topics and Calculators
Derivation of Rodrigues Rotation Formula and Formula for 3D Rotation Matrix,    Calculating 3D Rotation Matrix using Polar and Equatorial Angles of Axis of Rotation,    Calculating 3D Rotation Matrix using Euler and Tait-Bryan Angles/Matrices,    Finding Axes and Angles of Rotation from Rotation Matrix,    Finding Euler/Tait Bryan Angles from Rotation Matrix,    Rotation Axes (Yaw, Pitch, Roll) and Orientation (Heading, Attitude, Bank)
© Invincible IDeAS. All Rights Reserved