A finite two-dimensional photonic crystal with a triangular lattice of air
columns in a dielectric background is designed with a waveguide and a reson
ant cavity. By a time-domain solution of Maxwell's equations we observe the
existence of impurity modes inside the photonic bandgap. An electromagneti
c wave launched through the waveguide, with an appropriate frequency, can e
nhance the field inside the cavity and yield a peak in the transmission. Co
nsidering a manufactured structure, in which the columns are not perfectly
equal, we repeat our calculations and analyze how the impurity modes are mo
dified. For both cases, periodic and real, we measure the quality factor of
the cavity. (C) 2000 Optical Society of America [S0740-3224(00)01012-2] OC
IS codes: 230.7370, 230.5750.