I am trying to use Schwarz-Christoffel formula to map a n-polygon onto a unit circle. To do this, the parameter problem needs to be solved, which is non linear for which I am using least squares. The dimensionality is reduced by just using the angles on the unit circle and fixing radius = 1. The usual examples of a rectangle, square and triangle seems to work after tweaking the least_squares parameters. The solution however is extremely sensitive to initial conditions with other shapes and sometimes not even converging. How can I improve the versatility of the method to cover any polygon shape? Continue reading...