Rotation about a Point in the Plane

​
object
square
triangle
letter L
translation by -p
(for reference only;sliders are inactive.)
horizontally (x axis)
0
vertically (y axis)
0
rotation (angle)
θ
0
translation by p
horizontally (x axis)
0
vertically (y axis)
0
θ
x1
1
y1
1
matrix of the rotation about p = (0, 0)
1
0
0
0
1
0
0
0
1
1
0
0
0
1
0
0
0
1
1
0
0
0
1
0
0
0
1
=
1
0
0
0
1
0
0
0
1
In this Demonstration you can rotate a square, a triangle, or the letter L about the point
p=(x,y)
in the plane, choosing the coordinates
(x,y)
with the "translation by
p
" sliders or by dragging the point in the graphic. Change the angle
θ
to see the rotation about the point
p
. The
3×3
matrix of the rotation is given by the product of three operations (from right to left): translation by
-p
, rotation around the origin, and translation back by
p
.

Details

This Demonstration illustrates how to rotate a 2D graphical object about a point
p=(x,y)
in
2

. This can be done by composition of three
3×3
matrices applied to the object described in Homogeneous Coordinates. The rotation about
p
can be achieved by first translating the figure by
-p
with the matrix

I
-p
0
1

, rotating about the origin by
θ
with the matrix

A
0
0
1

, where
A=
cos(θ)
-sin(θ)
sin(θ)
cos(θ)
, and finally translating back to
p
with the matrix

I
p
0
1

.

External Links

Rotation Matrix (Wolfram MathWorld)
Homogeneous Coordinates (Wolfram MathWorld)
2D Rotation Using Matrices
Linear Transformations and Basic Computer Graphics

Permanent Citation

Ana Moura Santos, Pedro A. Santos, João Pedro Pargana
​
​"Rotation about a Point in the Plane"​
​http://demonstrations.wolfram.com/RotationAboutAPointInThePlane/​
​Wolfram Demonstrations Project​
​Published: January 5, 2011