A shape data generation method, comprising: setting an input shape for a target shape that is a three-dimensional shape of a transformation target identified from image data, wherein the input shape has a three-dimensional simple shape that has a same topology as the target shape; identifying, among a plurality of vertices of the input shape, first vertices whose normal line crosses with the target shape before the normal line crosses with the input shape; first transforming the input shape so that each first vertex is moved in a direction of a normal line of the first vertex by a first distance that is shorter than a distance up to the target shape; and performing the identifying and the first transforming a predetermined number of times while changing the input shape after the first transforming as the input shape to be processed, wherein the setting comprises: upon detecting that the target shape is a three-dimensional closed surface, reducing or expanding a spherical input shape that is the input shape in conformity with the target shape and placing the spherical input shape at a center of gravity of the target shape; and upon detecting that the target shape is a three-dimensional surface with an opening, transforming a flat input shape that is the input in conformity with the opening, and the first transforming comprises fixing an edge portion of the flat input shape that was transformed in conformity with the opening, and the first transforming comprises performing a remeshing processing for a mesh element whose area exceeds a threshold and a surrounding mesh element among a plurality of mesh elements in the input shape after the first transforming. setting an input shape for a target shape that is a three-dimensional shape of a transformation target identified from image data, wherein the input shape has a three-dimensional simple shape that has a same topology as the target shape; identifying, among a plurality of vertices of the input shape, first vertices whose normal line crosses with the target shape before the normal line crosses with the input shape; first transforming the input shape so that each first vertex is moved in a direction of a normal line of the first vertex by a first distance that is shorter than a distance up to the target shape; and performing the identifying and the first transforming a predetermined number of times while changing the input shape after the first transforming as the input shape to be processed, wherein the setting comprises: upon detecting that the target shape is a three-dimensional closed surface, reducing or expanding a spherical input shape that is the input shape in conformity with the target shape and placing the spherical input shape at a center of gravity of the target shape; and upon detecting that the target shape is a three-dimensional surface with an opening, transforming a flat input shape that is the input in conformity with the opening, and the first transforming comprises fixing an edge portion of the flat input shape that was transformed in conformity with the opening, and the first transforming comprises performing a remeshing processing for a mesh element whose area exceeds a threshold and a surrounding mesh element among a plurality of mesh elements in the input shape after the first transforming. upon detecting that the target shape is a three-dimensional closed surface, reducing or expanding a spherical input shape that is the input shape in conformity with the target shape and placing the spherical input shape at a center of gravity of the target shape; and upon detecting that the target shape is a three-dimensional surface with an opening, transforming a flat input shape that is the input in conformity with the opening, and the first transforming comprises fixing an edge portion of the flat input shape that was transformed in conformity with the opening, and the first transforming comprises performing a remeshing processing for a mesh element whose area exceeds a threshold and a surrounding mesh element among a plurality of mesh elements in the input shape after the first transforming.