[metapost] Re: workaround for turningnumber bug
laurent at math.toronto.edu
Sun Jan 30 03:26:30 CET 2005
> It looks like the inaccuracies introduced by calculating
> envelopes are the real culprits. That is to say: JDH hints
> in his explanations that "turningnumber" is actaully using the
> envelope routines instead of the path itself.
Mysterious. The winding number of the envellope of a penstroke
along a cycle may in general differ from the winding number
of the cycle, and may depend on pencircle diameter.
Maybe for finite but small diameter a useful winding
L. Nobre writes:
> Is that the reason for having a strange result from the
> buildcycle macro in the program below?
Chaining together pieces of curves that do not abut precisely
makes winding number of the built cycle undefined without
some hidden conventions.
Several possible conventions:
-- force the components of the built cycle to abut exactly --- see
B.Jackowsky's && operation in his recent posting.
-- ignore subpaths of short length in a bootstrappong turning
number calculation say as suggested by Werner LEMBERG. (Incidentally
his program aught to first break up paths that turn >= 180 degrees).
-- do with more care something JDH already does???
I have always felt that MF/MP should never have used or even
mentioned turning number. Winding numbers (used in PS) are more
More information about the metapost