[NTG-context] metafun's "smoothed"

Aditya Mahajan adityam at umich.edu
Sun Nov 25 17:00:24 CET 2007


On Sun, 25 Nov 2007, Mojca Miklavec wrote:

> Hello Hans,
>
> What exactly is the intended function of "smooothed"? I thought that
> the following should work and make round corners, but it only takes
> the bounding box. (I didn't play with it yet, but I assume that
> "punked" behaves in a similar way to what I would expect - it modifies
> the whole curve.)
>
> \starttext
> \startMPcode
> path p;
> % return
> p := ((0,0)--(1,0)--(1,2)--(-0.5,2)--(-0.5,1)--(0,1)--cycle) scaled 1cm;
> draw p;
> draw p smoothed 1mm shifted (3cm,0);
> \stopMPcode
> \stoptext

Replying from memory here so I may be wrong. From what I remember, 
smoothed has a ..cycle in its definition. Compare the definition of 
punked and smoothed and modify smoothed accordingly. I remember doing this 
once to get a smoothed curve.

Aditya


More information about the ntg-context mailing list