Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Computational Geometry > Geometric Transforms >
Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Transformations > Geometric Transforms >

RotationTransform

RotationTransform[Theta]
gives a TransformationFunction that represents a rotation in 2D by theta radians about the origin.
RotationTransform[Theta, p]
gives a 2D rotation about the 2D point p.
RotationTransform[Theta, w]
gives a 3D rotation around the direction of the 3D vector w.
RotationTransform[Theta, 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[Theta, {u, v}, ...]
gives a rotation by theta radians in the hyperplane spanned by u and v.
  • Theta Degree or Theta° specifies an angle in degrees.
  • RotationTransform[Theta, {u, v}, p] can be used to specify any rotation about any point p, in any number of dimensions.
  • Positive Theta in RotationTransform[Theta, {u, v}, p] corresponds to going from the direction of u toward the direction of v.
  • RotationTransform[Theta, {u, v}] can effectively specify any element of the n-dimensional rotation group SO (n). RotationTransform[Theta, {u, v}, p] can effectively specify any element of the n-dimensional special Euclidean group.
A 2D rotation transform by Theta radians:
Rotate a vector:
Rotate around the z axis:
Rotate a 2D graphic by 30° about the origin:
A 2D rotation transform by Theta radians:
In[1]:=
Click for copyable input
Out[1]=
Rotate a vector:
In[2]:=
Click for copyable input
Out[2]=
 
Rotate around the z 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]=
Rotation by theta radians about the point {px, py}:
Rotation by theta radians around the x axis about the point {px, py, pz}:
A 2D rotation by Theta in the x, y plane:
A 3D rotation by Theta in the x, y plane:
A 4D rotation by Theta in the x, y plane:
A 3D rotation by Theta in the plane parametrized by s{1,-1,1}+t{1,1,1}:
This rotates the vector {1,-1,1}:
Generate the transform for a symbolic vector assuming that all quantities are real:
Simplify the result further by assuming that {x,y,z} is a unit vector:
Transformation applied to a 2D shape:
Transformation applied to a 3D shape:
Parametrize a great circle passing through the points u and v on a sphere:
The great circle passing through and :
This plots the great circle:
This shows the great circle and points on the unit sphere:
The inverse of RotationTransform[Theta, {u, v}] is RotationTransform[-Theta, {u, v}]:
The inverse of RotationTransform[Theta, {u, v}] is RotationTransform[Theta, {v, u}]:
If u or v is not real, the relationship is more complex:
The inverse of RotationTransform[Theta] is given by RotationTransform[-Theta]:
The inverse of RotationTransform[Theta, w] is given by RotationTransform[-Theta, w]:
The inverse of RotationTransform[Theta, w] is also given by RotationTransform[Theta, -w]:
If w is not real, the relationship is more complex:
The composition of rotations is a rotation:
For graphics transformation use Rotate:
The order in which rotations are applied is important:
Compare the result of the two possible orders; the result is not zero:
Rotating a character:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team