1. A method of transforming a first integrated circuit (IC) pattern, wherein the first IC pattern includes a shape that is not one of a plurality of user-defined shapes, the method comprising the steps of: using a computer, deriving a second IC pattern approximating the first IC pattern, wherein the second IC pattern includes a shape that is one of the plurality of user-defined shapes; calculating a pattern approximation error between the first IC pattern and the second IC pattern; and upon a condition in which the pattern approximation error is greater than a user-defined threshold, performing the steps of: splitting the first IC pattern into a plurality of sub-patterns; and recursively transforming each of the plurality of sub-patterns.