Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been working Euclidean Ricci Flow but have been having considerable trouble trying to implement the same discrete gradient descent functionality in hyperbolic space.

I am following the proposed algorithm at the end of "Computing Teichmuller Shape Space" but the algorithm fails very quickly due to the $\operatorname{acos}$ function's $[-1, +1]$ bounds.

If anyone could confirm that I am using the proper equations it would be very helpful.

Pre Processing (circle packing generation): $$$$ 1) compute vertex radius $$\gamma_i = \frac{l_{ij} + l_{ki} - l_{jk}}{2}$$ where $l_{xy}$ is the euclidean distance between two points $$$$ 2) compute edge weight $\Phi_{ij}$ vai the hyperbolic cosine law $$\cosh l_{ij} = \cosh \gamma_i \cosh \gamma_j + \sinh \gamma_i \sinh \gamma_j \cos\Phi_{ij}$$ as such I am using: $$\Phi_{ij} = \operatorname{acos}\frac{\cosh \gamma_i \cosh \gamma_j - \cosh l_{ij}}{-\sinh \gamma_i * \sinh \gamma_j}$$

Main Loop (gradient descent): $$$$ 1) compute new edge length $l_{ij}$ using the inverse of the hyperbolic cosine law: $$l_{ij} = \operatorname{arccosh}(\cosh \gamma_i \cosh \gamma_j + \sinh \gamma_i \sinh \gamma_j \cos\Phi_{ij})$$

2) compute the corner angles $\theta_i^{jk}$ of every face using the hyperbolic cosine law: $$\theta_i^{jk} = \operatorname{acos}\left(\frac{\cosh l_{ij} \cosh l_{ki} - \cosh l_{jk}}{\sinh l_{ij} \sinh l_{ki}}\right)$$

3) compute the angle deficit at every vertex (easy)

4) update $y_i$ based on the difference of target and current gaussian curvature (easy)

5) loop while max error > allowed error (easy)

share|cite|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.