Cela viendrait-il pas d'Acrobat ???
*** Pour masquer/découvrir le code Asymptote qui a permis de créer la figure, il faut cliquer dessus. ;-) ***
- CODE ASYMPTOTE de la figure ci-dessus : Tout sélectionner
- import roundedpath;
- size(5cm,0);
- path [] EdVenn(int n)
- { path [] opath;
- if (n>=1)
- opath.push(shift(-1.4,-.9)*roundedpath(xscale(2.8)*yscale(.9)*unitsquare,.1));
- if (n>=2)
- opath.push(shift(0,-.9)*roundedpath(xscale(1.4)*yscale(1.8)*unitsquare,.1));
- if (n>=3)
- opath.push(scale(.5)*unitcircle);
- for (int i=1; i<=n-3; ++i)
- {
- pair pcle=point(opath[2],1/(2^i)),
- ccle=intersectionpoint(pcle--(pcle-dir(opath[2],1/(2^i))), (0,0)--(1,0));
- path cle=shift(ccle)*scale(abs(pcle-ccle))*unitcircle;
- real[] p1=intersect(cle, opath[2]);
- path ocle=subpath(cle,-p1[0],p1[0]);
- guide tpath;
- real step=360/(2^i), a=0;
- for (int j=0; j<2^i; ++j)
- {
- tpath=tpath..rotate(a)*ocle;
- a+=step;
- }
- opath.push(tpath..cycle);
- }
- return opath;
- }
- string blend="Compatible"; //This is the default value
- path [] edvenn= EdVenn(4);
- pen [] fillp= new pen[]{black, red, green, blue};
- pen p=linewidth(1mm);
- for (int i=0; i<4; ++i) {
- fillp[i]=fillp[i]+opacity(.5,blend=blend);
- filldraw(edvenn[i], fillpen=fillp[i], drawpen=linewidth((i+1)*mm/2));
- }
- shipout(bbox(2mm,invisible),"pdf");