7.6 Explanation of Subroutines: Coordinate Transformation