B.5 2D coordinate transformation derivation