* filling overlap ?
@ 2018-10-07 11:09 Floris van Manen
2018-10-07 11:19 ` Mikael P. Sundqvist
0 siblings, 1 reply; 4+ messages in thread
From: Floris van Manen @ 2018-10-07 11:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 425 bytes --]
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
[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filling overlap ?
2018-10-07 11:09 filling overlap ? Floris van Manen
@ 2018-10-07 11:19 ` Mikael P. Sundqvist
2018-10-07 11:26 ` Floris van Manen
2018-10-07 11:43 ` Floris van Manen
0 siblings, 2 replies; 4+ messages in thread
From: Mikael P. Sundqvist @ 2018-10-07 11:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen <vm@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@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@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filling overlap ?
2018-10-07 11:19 ` Mikael P. Sundqvist
@ 2018-10-07 11:26 ` Floris van Manen
2018-10-07 11:43 ` Floris van Manen
1 sibling, 0 replies; 4+ messages in thread
From: Floris van Manen @ 2018-10-07 11:26 UTC (permalink / raw)
To: mailing list for ConTeXt users
thanks !
.F
>
> 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@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
> ___________________________________________________________________________________
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: filling overlap ?
2018-10-07 11:19 ` Mikael P. Sundqvist
2018-10-07 11:26 ` Floris van Manen
@ 2018-10-07 11:43 ` Floris van Manen
1 sibling, 0 replies; 4+ messages in thread
From: Floris van Manen @ 2018-10-07 11:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2795 bytes --]
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@gmail.com> wrote:
>
> On Sun, Oct 7, 2018 at 1:10 PM Floris van Manen <vm@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@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@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
> ___________________________________________________________________________________
[-- Attachment #1.2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-07 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07 11:09 filling overlap ? Floris van Manen
2018-10-07 11:19 ` Mikael P. Sundqvist
2018-10-07 11:26 ` Floris van Manen
2018-10-07 11:43 ` Floris van Manen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).