Library that generates loops for scanning polyhedra