Transformed cartesian to spherical coordinate system