RotationTransform

RotationTransform[θ]
gives a TransformationFunction that represents a rotation in 2D by θ radians about the origin.

RotationTransform[θ,p]
gives a 2D rotation about the 2D point p.

RotationTransform[θ,w]
gives a 3D rotation around the direction of the 3D vector w.

RotationTransform[θ,w,p]
gives a 3D rotation around the axis w anchored at the point p.

RotationTransform[{u,v}]
gives a rotation about the origin that transforms the vector u to the direction of the vector v.

RotationTransform[{u,v},p]
gives a rotation about the point p that transforms u to the direction of v.

RotationTransform[θ,{u,v},]
gives a rotation by θ radians in the hyperplane spanned by u and v.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

A 2D rotation transform by θ radians:

In[1]:=
Click for copyable input
Out[1]=

Rotate a vector:

In[2]:=
Click for copyable input
Out[2]=

Rotate around the axis:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Rotate a 2D graphic by 30° about the origin:

In[1]:=
Click for copyable input
Out[1]=

Rotate around the axis:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=Play Animation
Introduced in 2007
(6.0)