1. A method for simulating an aerial image generated by imaging an object with the use of an imaging optic, the object being illuminated by an illuminating optic by using a light source emitting illuminating radiation, the illuminating optic having a pupil plane, the method comprising: defining a first data set to represent the object; defining a second data set to represent the intensity distribution of the illuminating radiation in the pupil plane of said light source; and calculating the aerial image from the first and the second data set; wherein the resolution of the second data set varies according to the intensity or according to the location of the pupil plane, wherein the second data set is calculated from a first matrix of intensities having constant resolution by combining a plurality of adjacent pixels into superpixels according to their intensities or their locations, and wherein during the calculation of the second data set the resolution is increased from the center of the pupil to the edge.