the present invention relates to a method for writing a pattern on a surface intended for use in exposure equipment , including the steps of : arranging an object having a thickness provided with a surface on a stage of a pattern generating apparatus , dividing the surface into a number of measurement points , where two adjacent measurement points being spaced a distance apart not exceeding a predetermined maximum distance , determining the gradient of the surface at each measurement point , calculating a 2 - dimensional local offset in the x - y plane for each measurement point as a function of the gradient , and the thickness of object , and correcting the pattern to be written on said surface by using the 2 - dimensional local offset . the invention also relates to a method for measuring the physical properties of a surface .