Perform a change of variables to a rectangular domain, as explained here and here and here, for example.