[NTG-context] About the macro ulcircle

2015-01-09 Thread Fabrice Couvreur
Hi,
I discovered some macro Metafun particular.
I then wanted to outline, but it does not fit with the boundary of the
quadrant.
Can I have some explanation ?
Best regards,
Fabrice

\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
fill ulcircle scaled 8u withcolor lightgray ;
fill llcircle scaled 2u shifted (1u,0) withcolor lightgray ;
fill lrcircle scaled 4u shifted (1u,1u) withcolor lightgray ;
fill urcircle scaled 6u shifted (0,1u) withcolor lightgray ;
label.lft(btex $x$ etex, (0,0.5u)) ;
fill unitsquare scaled 1u withcolor lightgray ;
draw unitsquare scaled 1u ;
draw (-4u,0)--(0,0) dashed evenly ;
draw (0,1u)--(0,4u) dashed evenly ;
draw (1u,1u)--(3u,1u) dashed evenly ;
draw (1u,0)--(1u,-1u) dashed evenly ;
draw (-4u,0){up}..(0,4u)..(3u,1u){down} ;
\stopMPcode
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] About the macro ulcircle

2015-01-09 Thread Hans Hagen

On 1/9/2015 8:07 PM, Fabrice Couvreur wrote:


Hi,
I discovered some macro Metafun particular.
I then wanted to outline, but it does not fit with the boundary of the
quadrant.
Can I have some explanation?
Best regards,
Fabrice

\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
fill ulcircle scaled 8u withcolor lightgray ;
fill llcircle scaled 2u shifted (1u,0) withcolor lightgray ;
fill lrcircle scaled 4u shifted (1u,1u) withcolor lightgray ;
fill urcircle scaled 6u shifted (0,1u) withcolor lightgray ;
label.lft(btex $x$ etex, (0,0.5u)) ;
fill unitsquare scaled 1u withcolor lightgray ;
draw unitsquare scaled 1u ;
draw (-4u,0)--(0,0) dashed evenly ;
draw (0,1u)--(0,4u) dashed evenly ;
draw (1u,1u)--(3u,1u) dashed evenly ;
draw (1u,0)--(1u,-1u) dashed evenly ;
draw (-4u,0){up}..(0,4u)..(3u,1u){down} ;
\stopMPcode
\stoptext


think different ...

\starttext
\startMPcode
u:=1cm ;
pickup pencircle scaled 1pt ;
path p ; p := ulcircle scaled 8u; fill p withcolor red ;
path q ; q := llcircle scaled 2u shifted (1u,0) ; fill q withcolor green ;
path r ; r := lrcircle scaled 4u shifted (1u,1u); fill r withcolor blue ;
path s ; s := urcircle scaled 6u shifted (0,1u) ; fill s withcolor yellow ;
label.lft(btex $x$ etex, (0,0.5u)) ;
fill unitsquare scaled 1u withcolor lightgray ;
draw unitsquare scaled 1u ;
draw (subpath (2,3) of p) dashed evenly ;
draw (subpath (2,3) of q) dashed evenly ;
draw (subpath (2,3) of r) dashed evenly ;
draw (subpath (2,3) of s) dashed evenly ;
draw (subpath (4,5) of p) dashed evenly withcolor green ;
\stopMPcode
\stoptext

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] About the macro ulcircle

2015-01-09 Thread Fabrice

Dear Hans,
I do not have enough back from Metapost to think differently and I'm not 
you! :)

Fabrice
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___