Conversion of rectangular to cylindrical coordinates