Seamless Tiling of Quasi-Periodic Textures via an Optimal Cyclic Shift on a Discrete Torus | Synapse