The right regular pentagon in the hyperbolic plane has 5 equal sides and 5 right angles. This is possible only in a space with negative curvature. We consider here 2D hyperbolic space with uniform negative curvature. We use a model of hyperbolic space so that we can both draw the space and navigate therein. Just as map makers distort the Earth’s surface when they make a flat picture, so must we distort in order to depict our hyperbolic space. When we do this there is one set of points but two geometries imposed thereon. Our model is half of the Euclidian plane: {⟨x, y⟩ | y > 0}. We use the same coordinates for both geometries. We use normal fonts to name the Euclidean geometric constructs, such as length, angle, etc. We use bold to name constructs in the hyperbolic geometry—the length of a curve is different from the length of the same curve! A geodesic is a curve which is as straight as possible. It is the shortest distance between two points. In our model the geodesic is a half circle whose center is at ⟨x, 0⟩ for some x.

The covariant metric for this model is
gij =
 y−2 0 0 y−2
To describe a geodesic parametrically we may use either of two parameters, α or λ. α is an angle and λ is the length along the geodesic. λ is an arc-length parameter. For the circle of radius r and center at ⟨xc, 0⟩
⟨x, y⟩ = ⟨ xc + r sin α, r cos α⟩ for −π/2 < α < π/2.

Here are some facts that derive from the above that are well known and that we will not derive:
When two curves meet their angle is the same as their angle. (The model is conformal.)
dλ/dα = 1/cos α.

Circles that are above the X axis are circles and conversely. When a circle is not entirely above the X axis, the portion that is, is an infinitely long uniformly curved curve.

We need to relate α and λ so that we can compute one from the other. λ = ∫ sec α dα. The Integrator yields − log(cos α/2 − sin α/2) + log(cos α/2 + sin α/2) for ∫ sec α dα.
sin β + cos β = (√2)sin(β + π/4)
sin β − cos β = (√2)sin(β − π/4)
∫ sec α = log(2)/2 + log(sin(α/2 + π/4)) − log(sin(α/2 − π/4))
= log(sin(α/2 + π/4)/cos(α/2 + π/4)) = log(tan(α/2 + π/4)).

This is numerically corroborated by this Scheme code. Thus for −π/2 < α < π/2 and −∞ < λ < ∞:

λ = log(tan(α/2 + π/4))
α = 2 tan−1 eλ − π/2

We denote a point and a heading on the plane by ⟨x, y, β⟩ with −π/2 < β < 3π/2. β = 0 for heading in the +x direction and β = π/2 for the +y direction. If we are at ⟨x, y, β⟩ then we are on the circle (and geodesic) whose center is at ⟨x + y tan β, 0⟩. If β < π/2 then α = −β and we are proceeding towards greater x. Otherwise α = π−β and we are proceeding towards smaller x.

As we traverse the right pentagon we proceed distance δ (which we shall evaluate) with the current heading along a geodesic and then change our heading by π/2. When we repeat this 5 times, we should arrive back where we started if we have the correct value for δ. This Scheme code verifies that δ = log(2.890053638264) brings us back to the starting point within the limits of IEEE double precision floating point.

The Inverse Symbolic Calculator suggests that eδ may be a root of 1−3x+3x4−x5.
Here is an Algol 68 program that verifies that eδ is a root of 1−3x+3x4−x5 to 500 digits.
Here is Don Chakerian’s explanation of all of this which I would not have discovered!
sinh2(δ)=cosh(δ) to too many digits.

### Poincaré’s Disk Model

In order to plot our construction in Poincaré’s conformal hyperbolic disk model (which makes prettier pictures) we construe our points ⟨x, y⟩ that we would plot, as the complex number x + i(y+1) and plot instead the point 1/(x + i(y+1)). This is a conformal map of our half plane onto the circular disk with radius ½ and center at −i/2. The map takes circles into circles.

The beautiful symmetry of the circle temps us to rotate the circle by θ and map back to the half plane. This should provide a isometry there.
x'+i(y'+1) = (1/(x + i(y+1)) + i/2)e − i/2

Here is an flaky application to computer hardware.
With
gij =
 −1/t2 0 0 1/t2
geodesics are hyperbolae with asymptotes at angle π/4 and foci with y=0 in the half plane.
See this!!