# Conformal mapping from triangle to upper half plane in terms of Weierstrass $\wp$

I'm trying to explicitly compute a conformal map $f:\Delta \rightarrow \mathbb{H}$ where $\Delta$ is a triangle and $\mathbb{H}$ is the upper half plane, in terms of the Weierstrass $\wp$ function. I know that the function should be the inverse of a Schwarz triangle function, and there should be a relation to $\wp$ by elliptic integrals, but I'm a bit lost as to finding one explicitly. For example, how would one go about for finding such a map for the triangle with vertices, say, $(0,i,1)$?

Examples or suggestions would be greatly appreciated! Wolfram gives an explicit function for another triangle here: http://functions.wolfram.com/EllipticFunctions/WeierstrassPPrime/31/01/, but I'd like to how how they computed it.

-

The basic idea is to extend $f$ by repeated reflection in the sides to a meromorphic function of the plane. This function will be doubly periodic with some period lattice $\Gamma$. Now using the fact that every such function is a rational function of $\wp$ and $\wp'$, where $\wp$ is the Weierstrass function corresponding to $\Gamma$, you can figure out an explicit expression.
In your case, if we normalize by $f(0)=\infty$, $f(1)=0$, and $f(i)=1$, the meromorphic function we get by repeated reflection has a corresponding lattice $\Gamma$ generated by $\omega_1=2$ and $\omega_2=2i$. In the fundamental square $[0,2)\times[0,2)$ it has double poles at $0$ and $1+i$, and critical points of local degree $4$ at $1$ and $i$. Its degree on the fundamental square is $4$, and it is also easy to see that $f$ is even. This all shows that $f(z) = R(\wp(z))$, where $\wp$ is the Weierstrass function with lattice $\Gamma$, and $R$ is a rational function of degree $2$. By comparing poles we see that $R$ has to have simple poles at $\infty$ and at $\wp(1+i)=e_3$, and by comparing zeros we see that $R$ has to have a double root at $\wp(1)=e_1$, so $R(w)= a \frac{(w-e_1)^2}{w-e_3}$. By using the normalization $1=f(i) = R(\wp(i)) = R(e_2)$ we get $a= \frac{e_2-e_3}{(e_2-e_1)^2}$, so to summarize $$f(z) = \frac{e_2-e_3}{(e_2-e_1)^2} \frac{(\wp(z)-e_1)^2}{\wp(z)-e_3}$$ where we used the standard notation (see Wikipedia) $$e_1 = \wp(\omega_1/2) = \wp(1), \quad e_2 = \wp(\omega_2/2) = \wp(i), \quad e_3 = \wp((\omega_1+\omega_2)/2) = \wp(1+i).$$ Using either symmetry arguments or the explicit expression with $\theta$-functions we also know that $e_3=0$, $e_1>0$, and $e_2=-e_1$, so $$f(z) = -\frac{1}{4e_1} \frac{(\wp(z)-e_1)^2}{\wp(z)}$$