[NTG-context] filling overlap ?

Floris van Manen vm at klankschap.nl
Sun Oct 7 13:43:03 CEST 2018


so digging a little deeper brings me this solution:

path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
path q ; q := fullsquare xscaled  9mm yscaled 11mm superellipsed .7 ;
q := q shifted (3mm, -2mm);
path r ; r := fullsquare xscaled  8mm yscaled 10mm superellipsed .7 ;
r := r shifted (0mm, -4mm);

fill p withcolor red ;
clip currentpicture to q ;
clip currentpicture to r ;

draw p ;
draw q ;
draw r ;




> On 7 Oct 2018, at 13:19, Mikael P. Sundqvist <mickep at gmail.com> wrote:
> 
> On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen <vm at klankschap.nl> wrote:
>> 
>> Could someone point me to te way as how to fill only the overlap of three paths using metafun ?
>> 
>> path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
>> path q ; q := fullsquare xscaled  9mm yscaled 11mm superellipsed .7 ;
>> q := q shifted (3mm, -2mm);
>> path r ; r := fullsquare xscaled  8mm yscaled 10mm superellipsed .7 ;
>> r := r shifted (0mm, -4mm);
>> draw p ;
>> draw q ;
>> draw r ;
>> 
>> 
>> 
>> Thanks
>> .Floris
>> 
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> 
> Hi!
> 
> This is something similar as in page 304 of the manual
> http://www.pragma-ade.com/general/manuals/metafun-p.pdf
> 
> \startMPpage
> path p ; p := fullsquare xscaled 10mm yscaled 12mm superellipsed .7 ;
> path q ; q := fullsquare xscaled  9mm yscaled 11mm superellipsed .7 ;
> q := q shifted (3mm, -2mm);
> path r ; r := fullsquare xscaled  8mm yscaled 10mm superellipsed .7 ;
> r := r shifted (0mm, -4mm);
> path pr,pqr;
> pr = buildcycle(p, r);
> %fill pr withcolor 0.5white;
> pqr = buildcycle(q,pr) ;
> fill pqr withcolor darkyellow;
> draw p ;
> draw q withcolor darkred;
> draw r withcolor darkblue;
> \stopMPpage
> 
> /Mikael
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20181007/8f60dafa/attachment.sig>


More information about the ntg-context mailing list