[metapost] New number systems compute cyclic path strangely

luigi scarso luigi.scarso at gmail.com
Mon Apr 29 09:05:46 CEST 2024


On Sun, 28 Apr 2024 at 17:21, Toby Thurston <thurston at eml.cc> wrote:

> This recent question on TexSE seems to have uncovered an anomaly in the
> way that MP computes the `arclength` of cyclic paths when using any of the
> new number systems.
>
> https://tex.stackexchange.com/q/716630/15036
>
>
> The poster supplied this example code
>
> beginfig(1);
> path p;
> p = (0,0){up}..{right}(200,100)..{up}(300,400)..cycle;
> len := arclength p;
> s := arctime (2500) of p;
> t := arctime (len+2500) of p;
> draw p;
> show len;% 2799
> show s;% 2.92...
> show t;% 2.67...
> show arctime arclength p of p;
> show numbersystem;
>
> endfig;
> end
>
> With the default number system the value of t is 5.92... as you might
> expect, but with any of the new number systems the value is 2.67.....
>
> The original poster as TeX.SE was using MP 2.02 but I I see this behaviour
> with  MetaPost, version 2.10 (TeX Live 2024).
>
> Toby
> --
> http://tug.org/metapost/


I will check asap.

--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/metapost/attachments/20240429/66b7bf71/attachment.htm>


More information about the metapost mailing list.