--- from: http://rosettacode.org/wiki/Faces_from_a_mesh