[metapost] Re: all intersections between two paths
lfinsto1 at gwdg.de
Tue Jan 11 18:33:35 CET 2005
On Tue, 11 Jan 2005, Boguslaw Jackowski wrote:
> LF> I don't quite understand why you don't want your macros to process the
> LF> `paths' until all of the resulting `paths' fulfill your two conditions.
> I do want, but I don't know how to do it reliably. As you have seen, even the
> question whether two curves touch each other cannot be reliably answered. In
> general, I to not know how to deal efficiently and reliably with
> infinitezimal artefacts.
I see. It was actually your son from whom I learned one of
my favorite sayings: "You're not a pharmacist; it doesn't
have to be perfect." If it were me, I'd say "If Metafont
says they intersect, they intersect, otherwise, they don't."
I'm not by any means saying you should do things my way.
> I can agree that my knowledge about discrete
> geometry is insufficient.
I wasn't casting aspersions. "People who live in glass
houses", you know.
> Still, I'd bet that: give me a ``universal''
> MP/MF algorithm and I'll find you a counterexample...
> Needless to say, if there existed a reliable criterion that would tell
> naughty paths from tidy ones, I'd be happy. No idea whether such
> a criterion exists. Frankly speaking, I doubt. But maybe I'm wrong.
> Therefore I asked the question about such a criterion.
I don't quite understand. I think your constraints are
reasonable. I just think it's likely that breaking up
`paths' that don't fulfill them until all of the resulting
`paths' do would be a good way of handling the general
case. I think it might be easier than inventing a cleverer
algorithm that can handle "naughtier" `paths'. However,
maybe someone knows such an algorithm already. On the other
hand, if it fails for some cases, then it just fails. I
think it would be worthwhile to implement it even if it only
handles, say, 90% of the cases.
More information about the metapost