Modified rotated_to_normal_coords to work with new dimension scheme.