Genus

Genus is defined by the following formula discovered by Leonhard Euler:
1+(E-V-F)/2 where
V is the number of vertices, E is the number of edges, F is the number of faces.

Genus is a measure of the complexity of a polyhedron.

Since these polyhedra can be infinite in size V, E and F are calculated for the smallest repeating unit that preserves the internal/external property. This unit will be a parallelepiped. The internal/external property is necessary as otherwise the translation unit for some polyhedra would be half the size but would give an erroneous genus value.