Re: another question
"Daniel H. Luecking" <[email protected]> Tue, 2 Oct 2018 19:36:41 +0000
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <CY4PR04MB02654C72A4197CD977E5DDECB9E80@CY4PR04MB0265.namprd04.prod.outlook.com> |
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 no intersection. 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 intersect there. Dan, Daniel H. Luecking [[email protected]] Department of Mathematical Sciences 1 University of Arkansas Fayetteville, AR, USA 72701-1201 ________________________________ From: metapost <[email protected]> on behalf of Walt Burkhard <[email protected]> Sent: Tuesday, October 2, 2018 12:37 PM To: Metapost List Subject: [metapost] another question Hello, 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. Walt Burkhard -- http://tug.org/metapost/