For two thousand years Euclid's fifth postulate — through a point off a line there is exactly one parallel — looked like an obvious truth waiting to be proved. It isn't a truth; it's a dial. Turn it one way and you get the sphere, where triangles bulge past 180° and no line is parallel. Turn it the other and you get the hyperbolic plane, where triangles pinch below 180° and infinitely many parallels crowd through a single point. Flat Euclidean space is just the knife-edge in between. Every angle and area below is computed live from real spherical and hyperbolic geometry — switch tabs to switch worlds.
What is a straight line here? On a curved surface, the honest replacement for "straight line" is a geodesic: the shortest path between two points, the route you'd walk if you never turned your steering wheel. On a sphere every geodesic is a great circle — a circle whose plane passes through the centre, like the equator or any line of longitude. Lines of latitude (except the equator) are not geodesics: to stay on them you must keep steering.
Why no parallels. Any two distinct great circles intersect — in fact they cross at two antipodal points, the way every pair of longitude lines meets at both poles. So the Euclidean promise "there's a line through this point that never meets that one" simply has no examples on a sphere. The count of parallels is zero.
The bulge. A spherical triangle's three angles always sum to more than 180°. The overflow is the spherical excess E = A + B + C − π, and Girard's theorem (1629) says it equals the triangle's area on a unit sphere. Small triangle, small area, tiny excess — that's why local geometry fools us into thinking space is flat.
Reading the applet. The three corners are unit vectors on the sphere. The edge between two corners is drawn as the great-circle arc joining them. At each corner the code measures the angle between the two outgoing arc directions — the genuine interior angle — then sums them and subtracts 180°.
The octant. The button places corners at the north pole and two equator points 90° apart. Each angle is a clean right angle, the sum is 270°, and the patch is exactly ⅛ of the sphere. Its excess, 90° = π/2, equals its area of π/2 out of the sphere's total 4π. Everything checks.
Curvature in one number. The sphere has constant positive Gaussian curvature K = +1/R². The Gauss–Bonnet theorem ties it all together: (angle sum − π) = K × area. Positive curvature, positive excess, angles that bulge — three faces of the same fact.
Corners are unit 3-vectors; you drag them by ray-casting onto the sphere. Edges are great-circle arcs (the geodesic between two unit vectors).
Angle at corner A uses tangent directions t = normalize(B − (A·B)A) toward each neighbour; the interior angle is the angle between them.
Excess is A+B+C − 180° and area (in R² units) is that excess in radians.
Further reading: Girard (1629); Legendre, Éléments de géométrie; Gauss, Disquisitiones generales circa superficies curvas (1827); do Carmo, Differential Geometry of Curves and Surfaces.
The Poincaré disc model. The entire, infinite hyperbolic plane is drawn inside a unit disc. The catch is the ruler: distances stretch as you approach the boundary circle, which sits infinitely far from the centre. That's why the tiles shrink — they aren't really getting smaller, our finite window is just compressing an infinite amount of space near the edge.
Straight lines are arcs. A geodesic in this model is either a diameter or a circular arc that meets the boundary circle at a right angle. Those arcs look curved to a Euclidean eye, but to an inhabitant of the disc they are dead straight — the shortest path between their endpoints.
The defect. Every hyperbolic triangle has angle sum below 180°, and the missing amount, the defect δ = π − (A+B+C), equals the triangle's area (when K = −1). Because angles can't be negative, the defect can't exceed π — so no hyperbolic triangle has area larger than π, no matter how huge it looks.
Infinitely many parallels. Take a geodesic ℓ and a point P not on it. The two geodesics from P aiming at ℓ's two ideal endpoints are the limiting parallels — they approach ℓ but never touch. Every geodesic through P that lands between them also misses ℓ. There are infinitely many, so the parallel count is ∞. (You'll see this directly in the third tab.)
The {p,q} tilings. A regular tiling packs p-sided polygons with q meeting at each vertex. Euclid allows only {3,6}, {4,4}, {6,3}. The moment (p−2)(q−2) > 4, the corners no longer fit in flat space — but they fit perfectly in the hyperbolic plane, giving an infinite family of tilings. Escher's Circle Limit woodcuts are exactly these.
Curvature. The hyperbolic plane has constant negative curvature K = −1. Gauss–Bonnet again: (angle sum − π) = K × area. Negative K forces a negative excess — the defect — and the saddle-like flare that makes every direction curve away.
Geodesics are circles orthogonal to the unit boundary; each edge circle's centre C solves 2 a·C = |a|²+1 for its two endpoints (a diameter when the endpoints are collinear with the centre).
Angles are measured between the tangent directions of the two edge arcs at each corner — negative-curvature geometry, computed live.
Tiling reflects the central polygon across each edge (circle inversion) breadth-first, de-duplicating by centroid, up to the depth slider.
Further reading: Lobachevsky (1829) & Bolyai (1832); Poincaré (1882); Beltrami (1868); Coxeter, Introduction to Geometry; M. C. Escher, Circle Limit I–IV.
Drag P (the white dot) in any panel. In the flat and hyperbolic panels you can also drag the endpoints of ℓ.
The fifth postulate. Euclid's Elements opens with five postulates. The first four are short and obvious. The fifth — equivalent to Playfair's axiom: "through a point not on a line there is exactly one parallel" — is wordier and less self-evident. For twenty centuries geometers were convinced it must be a theorem hiding among the other four, and tried to prove it.
Every proof failed. Saccheri, Lambert, Legendre and others assumed the postulate false, hoping to derive a contradiction. They derived strange-but-consistent results instead — triangles with angle sums below 180°, a natural unit of length — never a contradiction. They had discovered hyperbolic geometry without believing it.
The breakthrough. In the 1820s–30s Lobachevsky and Bolyai independently took the leap: replace the fifth postulate with "infinitely many parallels" and treat the result as a real geometry. Gauss had reached the same conclusion privately but never published, fearing "the clamour of the Boeotians."
Made rigorous. The doubt "but is it consistent?" was settled by models: Beltrami, Klein and Poincaré built hyperbolic geometry inside Euclidean geometry (the disc you saw in tab 2). If hyperbolic geometry were contradictory, so would ordinary geometry be. The sphere does the same job for the "no parallels" case.
Which one is real? That's a physics question, not a maths one. On the scale of a room, space is flat to fantastic precision. But Einstein's general relativity makes spacetime genuinely curved — mass bends geodesics, light included — so the geometry of the actual universe is decided by measurement, not by Euclid. Cosmological data currently put the large-scale universe very close to flat.
The moral. Mathematics isn't a single fixed truth handed down from Euclid. Change one assumption and an entire, self-consistent new world clicks into place. The parallel postulate was the first crack that showed the whole edifice was a choice.
| Geometry | K | Parallels | Angle sum |
|---|---|---|---|
| Spherical | > 0 | 0 | > 180° |
| Euclidean | = 0 | 1 | = 180° |
| Hyperbolic | < 0 | ∞ | < 180° |
Flat panel draws the unique Euclidean parallel through P plus faint crossing lines. Spherical panel draws great circles through P (ellipses) all meeting ℓ. Hyperbolic panel draws the two limiting-parallel geodesics from P to ℓ's ideal endpoints, plus a shaded fan of non-intersecting geodesics — all computed as arcs orthogonal to the disc boundary.
Further reading: Euclid, Elements, Postulate 5; Saccheri, Euclides ab omni naevo vindicatus (1733); Lobachevsky (1829); Bolyai, Appendix (1832); Greenberg, Euclidean and Non-Euclidean Geometries; Stillwell, Sources of Hyperbolic Geometry.