This conformal mapping developed in the 1860s by Hermann Schwarz and Elwin Christoffel can be used to map a circle to a square and vice versa.

The equations for mapping the circular disc to a square region (and vice versa) are:

**z**and

**w**are points in the complex plane defined as

**z**= x + y i

**w**= u + v i

and

F is the Legendre elliptic integral of the 1st kind.

cn is a Jacobi elliptic function.

Ke is the complete elliptic integral of the 1st kind with parameter m = ½

(x,y) are coordinates on the square

(u,v) are coordinates on the circular disc

See Section 7 of my paper (page 19) for an explanation of the formulas

http://arxiv.org/ftp/arxiv/papers/1509/1509.06344.pdf

========================================================

Here is an example image of using the Schwarz-Christoffel mapping on a square chessboard

Schwarz-Christoffel chessboard |

and another on MC Escher's "Circle Limit IV"; i.e. angels and devils inside the Poincare disk.

Schwarz-Christoffel for squared Circle Limit IV |

Note that the Jacobi cn() function is an even function, so cn(x,k) = cn(-x,k).

Note to Gall Anonim's comment from

ReplyDeletehttp://mathproofs.blogspot.com/2005/07/mapping-square-to-circle.html

=========================================

There are no errors in the equations. There is just a slight confusion of rotation matrices. The scale factor for the square is indeed Ke/sqrt(2) but you forgot to multiply the 1/sqrt(2) from the rotation matrix to get Ke/2.

Note that rotation matrices have to this property: det(M)=1

In other words, they have to have determinant value of 1. Hence, there is a multiplication of 1/sqrt(2) on the matrices in the equation. One is inside the cn() formula and the other is in the beginning of the formula.

As for the addition of [Ke,0] instead of subtraction, you make a good point but there is no error in the formulas. I just made a simplification that is subtle. The Jacobi cn() function is an even function, so cn(x,k) = cn(-x,k). It is easy to write a version of the equations with the subtraction that you want. See the blog post above for the equivalent equation.

Stupid me. Now I see it. Thanks. Now I'm trying to implement the inverse transformation.

ReplyDeleteBTW, did you obtain these formulas on your own or did you find it somewhere?

Glad that I can help. The inverse transformation should also follow from the equations I provided. But, you have to implement a complex-valued arccosine function.

ReplyDeleteI derived these equations after studying the diagram in slide 11 of my presentation slides. I have not seen these equations appear elsewhere before. Albeit, my notation is non-standard. I am overloading complex numbers as a 2x1 vector. Some mathematicians might not like that, but it makes for a nice compact equation.