[metapost] turningnumber revisited
Boguslaw Jackowski
B_Jackowski at GUST.org.pl
Tue May 31 11:30:41 CEST 2011
Dear colleagues,
I was nearly sure that the problem of turningnumber has
gone forever... Alas, the simple example below shows that the
implementation of the turningnumber primitive needs fixing:
%%%% BEGIN turnpath.mp
path p;
p=origin .. controls (100,200) and (300,500) ..
(0,500) .. controls (-300,500) and (-100,200) ..
origin & cycle;
for i:=0 upto 8: show turningnumber(p rotated 45i); endfor
end.
%%%% END turnpath.mp
A 2-node, 4-control path above should have the turningnumber=1.
And this is the case with MF; with MP, however, the result depends
on the rotation of the path.
MP 1.211 and MP 1.503 produce the result
>> -1
>> -1
>> -1
>> 1
>> 1
>> 1
>> 1
>> -1
>> -1
MF's output is:
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
>> 1
Cheers -- Jacko
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Bogus\l{}aw Jackowski: B_Jackowski at GUST.ORG.PL
----------------------------------------------------------------
Hofstadter's Law: It always takes longer than you expect, even
when you take into account Hofstadter's Law.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the metapost
mailing list