Questions tagged [rotations]

This tag is for questions about rotations: a type of rigid motion in a space.

In 2-dimensional and 3-dimensional Euclidean space, the rotation is a type of distance-preserving linear transformation that has a fixed point and preserves orientation. In terms of the usual inner product $\langle\cdot,\cdot\rangle$ on $\Bbb R^2$ and $\Bbb R^3$, rotations are the transformations $T$ such that $\langle Tx,Ty\rangle=\langle x,y\rangle$ for all $x,y$, and the determinant of $T$ is equal to 1.

Geometrically, the rotation in $\Bbb R^2$, "spins" the plane around a point without flipping the plane or sliding it. In $\Bbb R^3$, a rotation fixes a line (called the axis of rotation) and "spins" the space around this line (without reflecting or sliding).

More generally, given an inner product space $V$ over a field $\Bbb F$, anything in the part of the orthogonal group connected to the identity can be considered a "rotation." This allows rotations to be defined for $\Bbb R^n$ for $n$ greater than 2 and 3, as well as vector spaces over fields other than $\Bbb R$.

As an example, the space $\Bbb R^4$ with a non-Euclidean metric $(1,1,1,-1)$ is Minkowski space which is a model for special relativity. Rotations still play an important role here beyond that of rotations in the spacial coordinates. For example, Lorentz transformations are rotations which move the time coordinate.

Rotations can also be represented in terms of matrices and the tag often goes with this tag, as questions can pertain to rotation matrices.

3344 questions
200
votes
21 answers

Calculate Rotation Matrix to align Vector $A$ to Vector $B$ in $3D$?

I have one triangle in $3D$ space that I am tracking in a simulation. Between time steps I have the previous normal of the triangle and the current normal of the triangle along with both the current and previous $3D$ vertex positions of the…
106
votes
9 answers

Why is the product of two rotation matrices not commutative?

Is there any intuition why rotational matrices are not commutative? I assume the final rotation is the combination of all rotations. Then how does it matter in which order the rotations are applied?
96
votes
3 answers

Modelling the "Moving Sofa"

I believe that many of you know about the moving sofa problem; if not you can find the description of the problem here. In this question I am going to rotate the L shaped hall instead of moving a sofa around the corner. By rotating the hall…
newzad
  • 4,923
92
votes
6 answers

Geometric interpretation for complex eigenvectors of a 2×2 rotation matrix

The rotation matrix $$\pmatrix{ \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta}$$ has complex eigenvalues $\{e^{\pm i\theta}\}$ corresponding to eigenvectors $\pmatrix{1 \\i}$ and $\pmatrix{1 \\ -i}$. The real eigenvector of a 3d rotation…
84
votes
5 answers

Math behind rotation in MS Paint

For those who don't know, MS Paint only has the options to rotate an image by right angles. To carry out an arbitrary rotation ($\theta^\circ$), the following hack is suggested: Horizontal skew by $\theta$ Vertical Stretch by $\displaystyle…
kuch nahi
  • 6,877
64
votes
5 answers

How do you rotate a vector by a unit quaternion?

Given a 3-variable right-handed vector v that is a translation measured in local space and a unit quaternion representing an orientation from local to world space, how do you use the quaternion to rotate the vector from local space to world…
61
votes
15 answers

Area of a square inside a square created by connecting point-opposite midpoint

Square $ABCD$ has area $1cm^2$ and sides of $1cm$ each. $H, F, E, G$ are the midpoints of sides $AD, DC, CB, BA$ respectively. What will the area of the square formed in the middle be? I know that this problem can be solved by trigonometry by using…
54
votes
3 answers

Rotation Matrix of rotation around a point other than the origin

In homogeneous coordinates, a rotation matrix around the origin can be described as $R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) & 0\\\sin(\theta) & \cos(\theta) & 0 \\ 0&0&1\end{bmatrix}$ with the angle $\theta$ and the rotation being…
45
votes
11 answers

"Random" generation of rotation matrices

For a current project, I need to generate several $3\times 3$ rotation matrices for input into an algorithm. I thought I might go about this by randomly generating the number of elements needed to define a rotation matrix and then calculating the…
45
votes
4 answers

Find the coordinates of a point on a circle

I have a circle like so Given a rotation θ and a radius r, how do I find the coordinate (x,y)? Keep in mind, this rotation could be anywhere between 0 and 360 degrees. For example, I have a radius r of 12 and a rotation θ of 115 degrees. How would…
45
votes
2 answers

Generalized Rotation Matrix in $N$-Dimensional Space Around $N-2$ Unit Vector

There is a 2D rotation matrix around point $(0, 0)$ with angle $\theta$: $$ \left[ \begin{array}{ccc} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{array} \right] $$ Next, there is a 3D rotation matrix around point $(0, 0, 0)$ and…
Ivan Kochurkin
  • 1,231
  • 2
  • 13
  • 28
40
votes
2 answers

Understanding rotation matrices

How does $ {\sqrt 2 \over 2} = \cos (45^\circ)$? Is my graph (the one underneath the original) accurate with how I've depicted the representation of the triangle that the trig function represent? What I mean is, the blue triangle is the…
user3871
  • 679
39
votes
3 answers

Why are orthogonal matrices generalizations of rotations and reflections?

I recently took linear algebra course, all that I learned about orthogonal matrix is that Q transposed is Q inverse, and therefore it has a nice computational property. Recently, to my surprise, I learned that transformations by orthogonal matrices…
35
votes
2 answers

Are Euler angles the same as pitch, roll and yaw?

I am wondering if pitch, roll and yaw are used to represent Euler angles? If not, what's the relationship between them? From wiki, I know that Euler angles are used to represent the rotation from three axes independently, which seems like pitch,…
Ovilia
  • 453
34
votes
4 answers

Can rotations in 4D be given an explicit matrix form?

Rotation in 2D by an angle $t$ can be performed using $$R=\begin{pmatrix}\cos(t) &-\sin(t) \\ \sin(t) & \cos(t)\end{pmatrix}$$ matrix. But, if I want to rotate a point or vector in 4D, is there any rotation matrix in explicit form? I have read…
1
2 3
99 100