# Schwarz-Christoffel transformation (circular version)

The complex-variables function

 $f(z)=\int_{0}^{z}\prod_{k=1}^{n}(\zeta-z_{k})^{\alpha_{k}-1}d\zeta\,,$

maps the closed unit disc $\overline{D}=\{\lvert z\rvert\leq 1\}$ in the complex plane conformally onto a polygon with $n$ sides, interior angles $0<\alpha_{k}\pi<2\pi$, and vertices $f(z_{k})$. (The polygon is assumed to be not self-intersecting.) The parameters $z_{k}$ lie on the unit circle, and depend, generally in a complicated way, on the length of the sides of the polygon.

The fractional powers $(\zeta-z_{k})^{\alpha_{k}-1}$ serve to clamp up an arc of the circle into a pointy angle of measure $\alpha_{k}\pi$. Indeed, the proof of the Schwarz-Christoffel formula shows that the function $f$ can be decomposed near $z_{k}$ as

 $f(z)=f(z_{k})+(z-z_{k})^{\alpha_{k}}g_{k}(z)\,,$

where $g_{k}$ is an analytic function with $g_{k}(z_{k})\neq 0$. See Figure 1.

Note that the exponent is $\alpha_{k}$ — not $\alpha_{k}/2$ — because the neigbourhood of a point $z_{k}$ in the domain space looks like a half-disc. For the same reason, the fractional power used in the formula is to be a single-valued branch continuous on the half-disc. Finally, the extra $-1$ exponents that appear in the integral representation for $f$ come from the power rule for differentiation.

## 0.1 Example: $n=3$

Figure 2 illustrates a mapping from the disc to a triangle ($n=3$). The contours are the approximate images, under $f$, of circles of radius $0.

We describe the method used to compute the figure. Points in the domain $\overline{D}$ are first parameterized as $z=re^{i\theta}$, with $0\leq r\leq 1$ and $0\leq\theta<2\pi$ ranging over a discrete grid, shown schematically in Figure 4. The integral defining the function $f$ is path-independent, and a natural choice for the paths are rays emanating from the origin. When computing the integrals along each ray, we exploit the additivity of the complex path integral:

 $f\bigl{(}(r+\Delta r\bigr{)}e^{i\theta})=f(re^{i\theta})+\int_{re^{i\theta}}^{% (r+\Delta r)e^{i\theta}}\prod_{k=1}^{n}(\zeta-z_{k})^{\alpha_{k}-1}\,d\zeta\,,$

so that $f(z)$ is found by summing a previously-computed value and a new integral to be computed. And the new integral is computed using 32-point Gauss quadrature after reparameterizing the path with $d\zeta=e^{i\theta}\,dr$.

The computation of the integrand

 $\prod_{k=1}^{n}(\zeta-z_{k})^{\alpha_{k}-1}=\exp\Bigl{(}\sum_{k=1}^{n}(\alpha_% {k}-1)\log(\zeta-z_{k})\Bigr{)}$

is straightforward, though we must be careful to respect the branch cuts prescribed above. The $\log$ function in most computer languages takes a branch cut on the negative axis. To get the single-valued branches we need in this situation, we must instead compute $\zeta\mapsto\log(\zeta-z_{k})$ via the expression

 $\zeta\mapsto\log iz_{k}+\log\frac{\zeta-z_{k}}{iz_{k}}\,,$

where $iz_{k}$ is the direction of the tangent to the circle at the point $z_{k}$.

Finally, after having obtained a discrete set of image points $f(z)$ traced along each circle $z=re^{i\theta}$, the contours in the figure are obtained by interpolating a curved Bézier spline through the image points.

If a triangle is prescribed with the vertex locations, it is not immediately obvious what the parameters $z_{k}$ should be to obtain that triangle. In the examples here, we simply avoid this difficulty by arbitrarily choosing the parameters $z_{k}=e^{2\pi i(k-1)/n}$ to be equally spaced on the unit circle, and hope that nice figures result.

The $\alpha_{k}$ parameters are easily determined from the angles of the desired figure; they are, in this example:

 $\alpha_{1}=\tfrac{1}{4},\quad\alpha_{2}=\tfrac{1}{2},\quad\alpha_{3}=\tfrac{1}% {4}\,.$

## 0.2 Example: $n=10$

Figure 5 shows an example with $n=10$ points. The strategy for computing this figure is similar to that of the triangle.

The parameters for this star are (rounded to four decimal places):

 $\displaystyle\alpha_{1}=0.2422\,,\quad\alpha_{2}=\alpha_{1}=1.3263\,,\quad% \alpha_{3}=\alpha_{9}=0.3026\,,$ $\displaystyle\alpha_{4}=\alpha_{8}=1.3026\,,\quad\alpha_{5}=\alpha_{7}=0.2754% \,,\quad\alpha_{6}=1.3440\,.$

## 0.3 Demonstration computer programs

• http://svn.gold-saucer.org/repos/PlanetMath/SchwarzChristoffelTransformationCircularVersion/schwarz-christoffel.pyPython source code for producing images of the Schwarz-Christoffel transformation

• http://svn.gold-saucer.org/repos/PlanetMath/SchwarzChristoffelTransformationCircularVersion/explanation.pyPython source code for the explanatory diagrams

## References

Title Schwarz-Christoffel transformation (circular version) SchwarzChristoffelTransformationcircularVersion 2013-03-22 16:52:57 2013-03-22 16:52:57 stevecheng (10074) stevecheng (10074) 8 stevecheng (10074) Result msc 31A99 msc 30C20