|
|
|
(Compiled with Asymptote version 1.87svn-r4652)
|
|
size(4cm,0);
dotfactor*=5;
dot(scale(2)*"A",(0.5,1),5N);
layer();
dot(scale(2)*"B",(1.5,1),5N);
filldraw(scale(2)*unitsquare, lightgray+opacity(.5));
shipout(bbox(5mm,black,RadialShade(lightblue,darkblue)), "pdf");
Mots-clefs : bbox, Fill/Unfill, Label, layer, opacity, Shading, shipout
|
|
|
(Compiled with Asymptote version 1.87svn-r4652)
|
|
size(10cm,0);
transform T=rotate(10)*xscale(1.1);
path c1=T*unitcircle, c2=T*scale(5)*unitcircle;
real l1=length(c1), l2=length(c2);
fill(scale(8)*shift(-0.5,-0.5)*unitsquare,blue);
int n=500;
real step=1/n;
for (int i=0; i < n; ++i) {
real t=i*step;
path g1=subpath(c1,t*l1,(t+step)*l1);
path g2=subpath(c2,t*l2,(t+step)*l2);
pair A=(relpoint(c1,t)+relpoint(c2,t))/2;
pair B=(relpoint(c1,t+step)+relpoint(c2,t+step))/2;
path sector=g1--reverse(g2)--cycle;
pen trans=opacity(((2-(2*i/n)^1.5))/2);
axialshade(sector,trans+i/n*white,A,trans+(i+1)/n*white,B);
}
shipout(bbox(lightblue+white,Fill),format="pdf");
Mots-clefs : Fill/Unfill, opacity, Shading