Hyperbolic Triangle

Author

Eric W. Weisstein
August 12, 2026

This notebook downloaded from https://mathworld.wolfram.com/notebooks/PlaneGeometry/HyperbolicTriangle.nb.

For more information, see Eric's MathWorld entry https://mathworld.wolfram.com/HyperbolicTriangle.html.

©2026 Wolfram Research, Inc. except for portions noted otherwise

Illustration

The shaded hyperbolic triangle is bounded by three geodesic arcs in the Poincare disk.

Module[{arc, color, geodesicArc, neutral, p, q, r}, 
  p = {-0.58, -0.12}; q = {0.48, -0.38}; r = {0.16, 0.6}; color = Blue; 
   neutral = LightDarkSwitched[Black, White]; geodesicArc[u_, v_] := 
    Module[{center, delta, deltas, radius, t1, t2}, 
     center = LinearSolve[2*{u, v}, {u . u + 1, v . v + 1}]; radius = Sqrt[center . center - 1]; 
      t1 = ArcTan @@ (u - center); t2 = ArcTan @@ (v - center); 
      deltas = {Mod[t2 - t1, 2*Pi], Mod[t2 - t1, 2*Pi] - 2*Pi}; 
      delta = First[Select[deltas, Norm[center + radius*{Cos[t1 + #1/2], Sin[t1 + #1/2]}] < 1 & ]]; 
      Table[center + radius*{Cos[t1 + s*delta], Sin[t1 + s*delta]}, {s, 0, 1, 1/40}]]; 
   arc = Join[geodesicArc[p, q], Rest[geodesicArc[q, r]], Rest[geodesicArc[r, p]]]; 
   Graphics[{{Directive[color, Opacity[0.18]], Polygon[arc]}, Directive[neutral, Opacity[1], 
      AbsoluteThickness[1.5], Dashing[{0.02, 0.02}]], Circle[{0, 0}, 1], 
     Directive[color, Opacity[1], AbsoluteThickness[2.5], Dashing[{}]], Line[geodesicArc[p, q]], 
     Line[geodesicArc[q, r]], Line[geodesicArc[r, p]], PointSize[0.016], Point[{p, q, r}], 
     Text[Style["A", 16, neutral, FontFamily -> "Times", FontSlant -> "Italic"], p + {-0.1, -0.1}], 
     Text[Style["B", 16, neutral, FontFamily -> "Times", FontSlant -> "Italic"], q + {0.1, -0.1}], 
     Text[Style["C", 16, neutral, FontFamily -> "Times", FontSlant -> "Italic"], 
      r + {0.02, 0.12}]}]]