[metapost] MetaFont: Unexpected behavior of intersections times

laurent at math.toronto.edu laurent at math.toronto.edu
Fri Apr 8 06:27:20 CEST 2011


Hi all,

Dan Luecking > I once had two semicircles that crossed
> (theoretically) at the midpoint of each, and MP said
> they did not cross.

L.S.> Loosely interpreted, this sounds to me like a bug, so I
> would like to see a concrete example and its explanation.
> It seems to contradict the claim I have just made.

Dan Luecking > There is no contradiction. The point of intersection in my
> problem case was a node, the endpoint of a Bezier segment.
> MF and MP examine pairs of Bezier segments only, not the
> paths as a whole. In my problem curves, no quadrilateral
> such as you have depicted existed for those pairs of Bezier
> segments that met at the point of (theoretical)
> intersection.

Nevertheless I believe Knuth has set things up so that, with one
proviso, his intersection algorithms do assert an intersection
of paths p and q whenever the underlying mathematical curves
do intersect.

The proviso is that the mathematical intersection be close
enough to MF/MP time-parametrized points on p and on q. This
seems a mild restriction since there are about
2^16 time values per path segment.

Dan Luecking > Now I can't seem to create any examples.

And so I still believe there should be none in reasonable MF/MP
practice.

Laurent S.






More information about the metapost mailing list