In this paper the 2D Helmholtz equation with space-dependent dielectric per
mittivity and/or magnetic permeability is considered. The structure of the
determining equations for the symmetry generator is analysed. It allows one
to End many nontrivial spatial profiles of dielectric functions for which
one can still separate variables in both the Helmholtz equation and corresp
onding Hamilton-Jacobi equation. For the case of the Dirichlet problem of t
he half-plane in an inhomogeneous medium the diffractive modes of the held
are characterized. Several specific examples are provided.