[metapost] Re: all intersections between two paths
lfinsto1 at gwdg.de
Tue Jan 11 14:21:02 CET 2005
On Tue, 11 Jan 2005, Boguslaw Jackowski wrote:
> LF> Do you have a routine that checks these conditions and
> LF> divides the `paths' into two or more `paths', if one of the
> LF> conditions is not fulfilled?
> No. Such a routine would be actually equivallent to the general solution
> (i.e., without restrictions) of the problem.
Yes, that's what I was getting at.
> I assume that it is a user who
> is responsible for providing ``safe'' data. I don't like it, but I cannot
> see how this could be avoided at the moment.
I don't quite understand why you don't want your macros to process the
`paths' until all of the resulting `paths' fulfill your two conditions.
It seems like it would be a straightforward coding task and a sensible
way of implementing a general solution. The code might take a long time
to run, of course, depending on the `paths', but I don't see any way
around that. It seems to me that working with spline curves involves a
lot of iterations and summations---that's just the way they are. I
haven't run into any algorithms that operate on them "as a whole", but
then I haven't been studying them for very long yet.
More information about the metapost