cubic lattice structure generator