Converts polar coordinates into rectangular coordinates.