  Folding a sequence $S$ into a multidimensional box is a well-known method
which is used as a multidimensional coding technique. The operation of folding
is generalized in a way that the sequence $S$ can be folded into various shapes
and not just a box. The new definition of folding is based on a lattice tiling
for the given shape $\cS$ and a direction in the $D$-dimensional integer grid.
Necessary and sufficient conditions that a lattice tiling for $\cS$ combined
with a direction define a folding of a sequence into $\cS$ are derived. The
immediate and most impressive application is some new lower bounds on the
number of dots in two-dimensional synchronization patterns. This can be also
generalized for multidimensional synchronization patterns. The technique and
its application for two-dimensional synchronization patterns, raise some
interesting problems in discrete geometry. We will also discuss these problems.
It is also shown how folding can be used to construct multidimensional
error-correcting codes. Finally, by using the new definition of folding,
multidimensional pseudo-random arrays with various shapes are generated.
