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

Rotation

  1. Rotations are Non Deformative Transformations that any Object can be subjected to. It refers to Angular Change in the Position of Coordinate Points of an Object, either because the Object is Rotated or the Coordinate System is Rotated.
  2. Any Rotation or Rotational Transformation in 3 Dimensions happens around a given Axis (given by a Unit Directional Vector) by a given Clockwise or Counter/Anti Clockwise Rotation Angle. Any Rotation in 2 Dimensions is a Special Case for Rotation in 3 Dimensions as in this the Object/Point that is Rotated lies on a Plane Perpendicular to the Axis of Rotation.

    Rotations in 2 and 3 Dimensions are calculated with respect to the Axis Passing through the Origins of 2 and 3 Dimensional Cartesian Coordinate Systems respectively.
  3. Any given Rotation can be expressed in following 2 equivalent ways
    1. A combination of an Axis of Rotation (given by a Unit Directional Vector) and a Clockwise or Counter/Anti Clockwise Angle of Rotation.
    2. A Rotation Matrix.
  4. 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.
  5. 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

  6. 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}\)
  7. 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)\)

  8. 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.
  9. 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.
  10. All Rotation Matrices are Orthogonal and have a Determinant Value of 1.
  11. 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