HomeArticlesMathematics

Torus and Genus: The Euler Characteristic of Surfaces

Why V - E + F gives the same number no matter how you mesh a surface, how genus fixes that number, and how Gauss-Bonnet ties curvature to topology.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Counting your way to a shape invariant

Cover any closed surface with a mesh of vertices, edges and faces — a triangulation, or any polygonal mesh — and count V, E and F. The combination χ = V - E + F is the Euler characteristic, and its value does not depend on how you meshed the surface: a coarse mesh and a fine mesh of the same sphere give the same χ. That is the whole point — χ is a topological invariant, a single integer that survives any deformation which does not tear or glue the surface.

cube (as a mesh):  V=8, E=12, F=6  →  χ = 8 - 12 + 6 = 2
any triangulated sphere            →  χ = 2   (always)
any triangulated torus             →  χ = 0   (always)
live demo · rotating genus-0/1/2/3 meshes, χ recomputed live● LIVE

Genus: how many handles

For a closed, orientable surface, χ is entirely determined by the genus g — informally, the number of "handles" or holes through the surface: χ = 2 - 2g. A sphere has genus 0 and χ = 2. A torus (donut) has one handle, genus 1, and χ = 0. A double torus (figure-eight surface, two handles) has genus 2 and χ = -2; a triple torus has genus 3 and χ = -4. Each extra handle you add subtracts exactly 2 from χ, regardless of the surface's size, curvature or how lumpy it looks.

This is why a coffee mug and a torus are considered the same shape in topology — a mug's handle is one hole, exactly like a donut's, so a continuous deformation (stretching, no cutting or gluing) can turn one into the other. A sphere, by contrast, can never be deformed into a torus this way: no amount of squishing changes χ from 2 to 0.

Gauss-Bonnet: curvature and topology, tied together

The Gauss-Bonnet theorem is the differential-geometry version of the same fact. It says the total Gaussian curvature K, integrated over the whole surface, is fixed by topology alone:

∬_S K dA = 2π χ(S)

A sphere (χ=2) must have total curvature 4π however you bend or bump its surface — squash it and some regions get flatter while others get more sharply curved, but the integral stays 4π. A torus (χ=0) must have total curvature exactly zero: the outer rim, which curves like a sphere (positive Gaussian curvature), is necessarily balanced by the inner rim near the hole, which curves like a saddle (negative Gaussian curvature). You cannot build a torus that is positively curved everywhere — the geometry is forced to have a saddle region by the topology alone, before you specify any particular shape.

Why this generalises the flat 2D case

Gauss-Bonnet is the curved-surface generalisation of a fact you already know from a flat triangle: its interior angles sum to π (180°). On a curved surface the analogous statement gets a correction term equal to the enclosed curvature, and summing that correction over the whole closed surface produces the 2πχ result. It is the same idea that makes a flight from London to Tokyo shorter along a great circle than along a straight line on a flat map — curvature changes what "straight" and "triangle" mean locally, but the global topological total is fixed.

Rendering it

A genus-g handlebody mesh is usually built by revolving a 2D cross-section (a circle for the torus, a figure-eight-like profile for genus 2 and above) around an axis, or by algebraically defining an implicit surface and marching cubes over it. Once you have V, E and F for the mesh, χ falls out of a single pass over the data structure — no calculus required to verify what the calculus-based Gauss-Bonnet theorem predicts.

Frequently asked questions

Why is a coffee mug topologically the same as a torus?

Because both have exactly one hole — one handle — and therefore the same genus (1) and the same Euler characteristic (0). A continuous deformation that does not cut or glue the surface can turn one into the other, which is the standard definition of topological equivalence.

Can a surface have a non-integer or fractional Euler characteristic?

For a closed, orientable surface, no — χ is always an even integer, 2 - 2g, because g counts whole handles. Non-orientable surfaces (like the Klein bottle) and surfaces with boundary follow related but different formulas, still always integers.

Does Gauss-Bonnet mean a torus must have negatively curved regions?

Yes, if it is smooth. Since a torus has χ = 0, its total curvature integrates to zero, and a positively curved outer rim must be offset by a negatively curved inner region near the hole — you cannot construct a smooth torus that curves like a sphere everywhere.

Try it live

Everything above runs in your browser — open Torus & Genus and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Torus & Genus simulation

What did you find?

Add reproduction steps (optional)