The passage of light through slowly varying nonuniform photonic crystal str
uctures is treated using Hamiltonian optics. The approach allows the invers
e design of complex and highly compact optical elements as well as providin
g insight and an appealing physical picture. It can also be used to treat t
he trapping and deflection of light at distributed defects in one- and two-
dimensional (2-D) crystals, and to study the frequency dependent time delay
in chirped one-dimensional (1-D) fiber Bragg gratings (FBG's).