# Rotation in the plane: rotation

### 13.15.4 Rotation in the plane: rotation

See Section 14.14.4 for rotations in space.

The rotation command creates a rotation.

- rotation takes two mandatory arguments and one optional argument:
  - P, a point (the center of rotation).
  - θ, the angle of rotation.
  - Optionally, G, a geometric object.
- rotation(P,θ) returns a new command which rotations about P through an angle of θ.
- reflection(P,θ,G) returns and draws the rotation of G about P through an angle of θ.

#### Examples.

- Input:

  r:= rotation(i, -pi/2)
  r(1+i)

  Output:
- Input:
  rotation(i, -pi/2, 1+i)
  Output:
  Input:
  rotation(i, -pi/2, line(1+i,-1))
  Output: