Rotation in the plane: rotation

### 12.15.4 Rotation in the plane: rotation

See section 13.14.4 for rotations in space.

The rotation command can take two or three arguments.

If rotation has two arguments, they are a point (the center of rotation) and a real number (the angle of rotation). rotation returns a new command which performs the rotation.
Input:

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

then:

r(1+i)

Output:

If rotation has three arguments, the first two arguments are a point and real number as above, and the third argument is a geometric object. rotation returns and draws the rotated object.
Input:

rotation(i, -pi/2, 1+i)

Output:

Input:

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

Output: