[metapost] turningnumber revisited
luigi scarso
luigi.scarso at gmail.com
Mon Jun 27 14:06:17 CEST 2011
On Mon, Jun 27, 2011 at 1:03 PM, Boguslaw Jackowski <jacko at bop.com.pl> wrote:
>
> Luigi:
>>
>> Do you have some explicit examples of paths with strange turning numbers
>> ?
>
> This seems to be ever-recurring problem. :)
>
> If anybody is able to predict the result of the following MF/MP code
> run on MF and MP
>
> path p;
> if known mitered: beginfig(100); fi
> p:=(0,0)..{up}(1,1) & (1,1){down} .. (2,0) -- cycle; show turningnumber p;
> if known mitered: draw p scaled 100; fi
maybe
from 0 to 1,1 +90°;
then +180° (hence I have 270°)
then from 1,1 to 2,0 +90° (hence I have 360°, i.e. turning number = +1)
then +180° (hence I have 360°+180°)
then from 2,0 to 0,0 go straight
then +180° to match the initial position (hence I have 360°+360°
turning number = +2)
--
luigi
More information about the metapost
mailing list