1. A method of optimizing an intensity profile of a pattern to be formed in a surface of a substrate relative to a given mask utilizing an optical system, comprising the steps of: (a) mathematically representing a goal function representing desired printing behavior of the given mask; (b) generating a mathematical expression representing certain characteristics of the optical system; (c) modifying the mathematical expression of Step (b); (d) generating an interference map in accordance with the result of Step (c) and Step (a) (e) determining assist features for the given mask based on the interference map of Step (d), wherein modifying the mathematical expression of Step (b) minimizes undesired printing in the surface of the substrate.