A method and apparatus is provided for writing a code on an optical
element, wherein the code is written on the optical element in the form
of a holographic image of an n-dimensional code generated by an
interference pattern between a reference beam and a signal beam reflected
off a spatial light modulation device having the n-dimensional code
configured thereon. The method includes steps of generating the
interference pattern between the reference beam and the signal beam
reflected off the spatial light modulation device having the
n-dimensional code thereon; as well as writing the interference pattern
on the optical element as a holographic image of the n-dimensional code.