1. A method for generating a pattern of a mask used for a mask manufacturing method for manufacturing the mask using data of the generated pattern of the mask, the method comprising the following steps performed by a processor: obtaining data of a plurality of polygonal pattern elements; grouping polygonal pattern elements which overlap or contact with each other among the plurality of polygon pattern elements in one group; setting an evaluation position for evaluating an image of the polygonal pattern elements of the one group on a side except for sides which overlap or contact with each other among sides of the polygonal pattern elements of the one group; calculating the image of the polygonal pattern elements of the one group; evaluating the calculated image at the set evaluation position; correcting the polygonal pattern element based on a result of the evaluating; and generating the pattern of the mask including the corrected polygonal pattern element, wherein the mask manufacturing method comprises a step of manufacturing the mask including the generated pattern using data of the generated pattern, and wherein the corrected polygonal pattern element of the manufactured mask are resolved on a substrate.