[metapost] another question
Daniel H. Luecking
luecking at uark.edu
Tue Oct 2 21:36:41 CEST 2018
The intersectionpoint macro, based on the intersectiontimes
primitive, works by succesively subdividing the two paths
and determining whether the parts are close together. It stops
when the range of the time parameter has been narrowed down
to some preset tiny parameter.
It is mainly luck if this produces the mathematically exact
intersection point. This seems to be especially true if the
point of intersection is a node of both paths. In that
case, the algorithm can even falsely conclude that there is
Coming within a distance less than .008 is good enough for
drawing purposes, but one should not rely on the
intersectionpoint even lying exactly on the paths that supposedly
Daniel H. Luecking [luecking at uark.edu]
Department of Mathematical Sciences
1 University of Arkansas
Fayetteville, AR, USA 72701-1201
From: metapost <metapost-bounces+luecking=uark.edu at tug.org> on behalf of Walt Burkhard <burkhard at cs.ucsd.edu>
Sent: Tuesday, October 2, 2018 12:37 PM
To: Metapost List
Subject: [metapost] another question
I have another question for the program attached below. The program is to round out the corner of two intersecting paths.
When it runs, the intersectionpoint does not seem to work correctly. The program makes three calls to intersectionpoint, the first two seem to work as expected. The third is to return the pair (120 ,300) but
instead returns something close (119.99693. 299.99229).
Using numbersystem = double does not resolve this issue. What is going on here?
Any suggestions would be appreciated. Many thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the metapost