Algorithm 3.
Embed the surface onto the Poincaré disk.
| Input: A multiply connected surface Σ with its hyperbolic uniformization metric and its simply connected domain Σ̃. | |||
| Output: The embedding of Σ̃ onto the Poincaré disk. | |||
| 1 | Copy the hyperbolic uniformization metric from Σ to Σ̃. | ||
| 2 | Select a seed face f012 = [υ0, υ1, υ2] ∈ Σ̃, map each vertex to the Poincaré disk as: p(υ0) = (0, 0), , and . | ||
| 3 | Put all the neighboring faces of f012 to a queue. | ||
| 4 | while the queue is not empty do | ||
| 5 |  | Pop the first face fijk from the queue; | |
| 6 | if fijk has been embedded then | ||
| 7 |  | Continue; | |
| 8 | else | ||
| 9 |  | Suppose υi and υj have been embedded, compute the intersections of two circles (center, radius): (p(υi), lik) and (p(υj), ljk). | |
| 10 | Then p(υk) is chosen as the intersection point that keeps the face upward. | ||
| 11 | Put the neighboring faces of fijk in the queue. | ||
| 12 | end | ||
| 13 | end | ||