Converting Coordinates between Polar and Rectangular Form