Figure 1. Schematic diagram of the Rotate algorithm