https://bugzilla.novell.com/show_bug.cgi?id=158573 ------- Comment #28 from wl@gnu.org 2006-10-13 08:00 MST ------- Regarding a new algorithm, perhaps the method I've implemented in mf2pt1 might help (you can get version 2.2 from CTAN; have a look at function `is_clockwise' in file mf2pt1.mp). It was necessary to add it because the built-in code of MetaPost was faulty then. Here a description: Find a point P on the path which has a non-zero direction. Construct a ray of ``infinite'' length, starting in the vicinity of P which intersects the path at this point. Use the MetaPost function `intersectiontimes' to find the intersection. If the direction of the path at this point is (near) zero, or if we have a grazing intersection, get a new ray. Shorten the ray so that it starts right after the intersection. Repeat the previous step until no intersection is found. Then go back to the last intersection and compare the path's direction with the direction of the ray. According to the `nonzero winding number' rule we have found a clockwise oriented path it it crosses the ray from left to right. This method completely avoids any problems with the geometry of Bézier curves. If problems arise, a different ray is tried. Since it isn't necessary to analyze the whole path it runs quite fast in spite of using `intersectiontimes' which is a quite slow. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.