  We have studied the formation of near-field fringes when sharp edges of
materials are imaged using scattering-type scanning near-field optical
microscope (s-SNOM). Materials we have investigated include dielectrics,
metals, near-perfect conductor, and those that possess anisotropic permittivity
and hyperbolic dispersion. For our theoretical analysis, we use a technique
that combines full-wave numerical simulations of tip-sample near-field
interaction and signal demodulation at higher orders akin to what is done in
typical s-SNOM experiments. Unlike previous tip-sample interaction near-field
models, our advanced technique allows simulation of the realistic tip and
sample structure. Our analysis clarifies edge imaging of recently emerged
layered materials such as hexagonal boron nitride and transition metal
dichalcogenides (in particular, molybdenum disulfide), as well as traditional
plasmonic materials such as gold. Hexagonal boron nitride is studied at several
wavelengths, including the wavelength where it possesses excitation of
phonon-polaritons and hyperbolic dispersion. Based on our results of s-SNOM
imaging in different demodulation orders, we specify resonant and non-resonant
types of edges and describe the edge fringes for each case. We clarify
near-field edge-fringe formation at material sharp boundaries, both outside
bright fringes and the low-contrast region at the edge, and elaborate on the
necessity of separating them from propagating waves on the surface of
polaritonic materials.
