Using a rigorous theory of scattering, numerical evidence of the exist
ence of localized modes in a one-dimensional or a two-dimensional set
of circular dielectric rods is given. Particular attention is paid to
the transition observed between the phenomena of propagation in period
ic structures and localization phenomena in random structures. In part
icular, we show the strong connection between the phenomenon of a phot
onic band gap that appears in two-dimensional periodic sets of rods an
d the phenomenon of Anderson localization which is observed when the p
eriodicity is broken.