[metapost] Re: all intersections between two paths
bop at bop.com.pl
Tue Jan 11 14:00:29 CET 2005
BJ> My question is: which constraints imposed on single B\'ezier segments
BJ> you would consider reasonable?
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. 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.
LF> Given the manipulations possible with connectors, I think it may be
LF> difficult to filter out `paths' with infinitely many intersections.
LS> I am optimistic that it can be done in some practical sense. Have
LS> you a specific challenge?
A trivial example:
unistquare xscaled a yscaled b
unistquare xscaled b yscaled a
Additionally both curves can be rotated and shifted. To make the task
more complex, imagine rounded corners; and things get really difficult
if there there are more such naughty curves. The cases of this kind
occur quite often in practice.
BOP s. c.
ul. Bora-Komorowskiego 24, 80-377 Gdansk, Poland
tel. (+48 58) 553 46 59, fax (+48 58) 511 03 81
bop at bop.com.pl, http://www.bop.com.pl
More information about the metapost