6.3 Explanation of Subroutines: Coordinate Transformation