1. A method of forming a three-dimensional image for an inspection pattern to be inspected, comprising: measuring an intensity of an inspection electromagnetic wave from an inspection pattern on a substrate; measuring an intensity of a reference electromagnetic wave from a reference pattern on a reference specimen, the reference pattern having substantially similar surface shape and material properties as the inspection pattern; decomposing a differential function from a reference intensity function, the reference intensity function defined as a continuous function of the intensity of the reference electromagnetic wave with respect to a depth of the reference pattern, the differential function decomposed into a start function and a characteristic function, the start function expressing a vertical profile function of the reference pattern and the characteristic function determining material properties of the reference pattern; integrating the differential function of the reference intensity function repeatedly to obtain an intensity of a temporary reference electromagnetic wave, the integration including substituting a temporary vertical profile function for the start function for each integration until the intensity of the temporary reference electromagnetic wave is determined to be within an allowable error range; selecting the substituted temporary vertical profile function as an optimal vertical profile function when the intensity of the temporary reference electromagnetic wave is within the allowable error range; and combining the surface shape of the inspection pattern and the optimal vertical profile function along a depth of the inspection pattern to form the three-dimensional image for the inspection pattern.