1. A method for constructing a computer aided design model of an object, the method comprising: receiving user input, wherein the user input comprises a callback function and a required accuracy, wherein the callback function contains a procedurally defined geometry, and wherein the required accuracy specifies a degree of accuracy needed for the computer aided design model of the object; sampling, by a processor unit, the callback function at a number of points to form sampled points; constructing a candidate curve that approaches the sampled points; and determining whether the candidate curve meets the required accuracy, determining including sampling the callback function at a number of additional points in each region between the sampled points to form comparison points, wherein each region between the sampled points is a polynomial piece; computing a distance between each comparison point and the candidate curve; and determining whether the distance between any comparison point and the candidate curve is greater than the required accuracy for each region.