I am interested in Python implementations of the Schwarz Christoffel mapping for simply and doubly connected polygonal domains. Well, I know that by now multiply connected domains can be dealt with, with the works of several authors (Tom DeLillo, Alan Elcrat, John Pfaltzgraff, and Darren Crowdy, to name a few). But to start with, I would like to know if someone has implemented some numerical algorithms in Python, similar (to some extent) to say the Schwarz-Christoffel Matlab toolbox, developed I think originally by Driscoll and Trefethen.
For instance, one big issue is to find the preimages of the polygonal vertices, the so-called parameters of the mapping. This is non-trivial. There are also various numerical issues with branch cuts. These are some numerical issues that one has to deal with. Of course, the Matlab toolbox solves all these issues, but since I only have access now to Python, I would like to know if these have been implemented in Python. If not, I may be interested in trying to implement them.
Edit: I was able to find some Python codes, to accomplish part of what I wanted, namely the programs linked to from http://planetmath.org/SchwarzChristoffelTransformationCircularVersion, in section 0.3. They seem to implement the mapping itself, when the "preimages" are also input. But they do not solve the issue of finding the actual preimages, that would produce a desired polygonal region. So this is good, but the tough part remains to be programmed, it seems.
Update: I have now implemented the Schwarz-Christoffel forward mapping in Python. However, while finding the preimages, some preimages tend to cluster really close together, so much that they are practically indistinguishable, numerically speaking. Anyone knows how to solve this clustering issue? I have only read so far Trefethen's original algorithm. By reading a little bit one of Driscoll's articles on the Matlab SC-toolbox, it seems that the algorithm using cross-ratios and Delaunay triangulations handles well the crowding problem. The only problem is, it would take me some time to implement it. Using the more basic algorithm by Trefethen, and using the usual Gauss quadrature (rather than the more suitable Gauss-Jacobi one) but with smaller and smaller intervals as one approaches the preimages, I was only able to get conformal maps into rectangles of aspect ratios less than 5 approximately (at least this is the case with the current version of my Python code).