[metapost] arclength() tolerances

Daniel H. Luecking luecking at uark.edu
Fri Apr 11 20:54:33 CEST 2014


Franck Pastor wrote:

>About arclength, I remembered having read something about it 
>somewhere,  but couldn't find it until just now. It was in a TUG article 
>written by the Asymptote authors: 
>   http://www.math.ualberta.ca/~bowman/publications/asyTUG.pdf
>
>p. 289: "Robust arc length and arc time computations were 
>implemented with adaptive Simpson integration, which was 
>determined to be more efficient than Bézier subdivision."
>
>Maybe the Simpson integration should be the way to go? (Don't 
>know enough about this subject to judge about it.)

As Taco said, MP already use Simpsons Rule and (if my reading of 
the web file is correct) it uses the adaptive version of it (i.e., a recursion
that ends when two successive steps are within a tolerance.)

If the implementation currently used in MP is closely tied to the scaled 
system and if Asymptote already has an efficient and robust implementation 
_not_ closely tied to a particular numbersystem, then perhaps it could just be 
borrowed for use in MP.

Dan

-- 
Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
Fayetteville, Arkansas



More information about the metapost mailing list