[metapost] buildcycle

js stock jsstockage at gmail.com
Mon Apr 19 11:57:06 CEST 2010


Thank you both for your help; I understand better what happens now.
To be complete, let's state the outcomes of the solutions proposed:

fill buildcycle(subpath(2,6) of p,q) withcolor red;
  This fills the union of the two ellipsis.

fill buildcycle(p,subpath(2,6) of q) withcolor green;
  This fills the intersection of the two ellipsis.

fill buildcycle(reverse(p),q) withcolor black;
  This fills p \ q.

Galtrack

2010/4/19 Pétiard François <petiard.francois at free.fr>

> Le 18/04/2010 16:39, js stock a écrit :
>
>
>  beginfig(8);
>> numeric a,b,c,d;
>> a=.5in; b=.7in; c=.3in; d=.5in;
>> z1=-z3=(a,0); z2=-z4=(0,b);
>> path p,q;
>> p=z1..z2..z3..z4..cycle;
>> q=p shifted (-1cm,0);
>> draw p;
>> draw q;
>> fill buildcycle(p,q) withcolor black;
>> endfig;
>> end
>>
>>
> Try:
>
> fill buildcycle(reverse(p),q) withcolor black;
>
> François
>
> --
> http://tug.org/metapost/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/metapost/attachments/20100419/fb52809e/attachment.html>


More information about the metapost mailing list