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 plane spanned by u and v.

Examples

open allclose all

Basic Examples(4)

A 2D rotation transform by θ radians:

 In[1]:=
 Out[1]=

Rotate a vector:

 In[2]:=
 Out[2]=

Rotate around the axis:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

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

 In[1]:=
 Out[1]=

Rotate around the axis:

 In[1]:=
 In[2]:=
 Out[2]= PlayAnimation