Modeling latent-image formation in photolithography, using the Helmholtz equation