Hi,
I would like to obtain, if possible, a gray gradient like in the image. My code uses Metapost but maybe this is possible with Metafun.
Thanks.
Fabrice
\starttext
\startMPcode
u=1.2cm;
interim ahangle := 30;
z0=(0,0);
z1=(3u,0);
z2=(3u,4u);
z3=(0,4u);
z4=(0.8u,4u);
z5=(2.2u,4u);
path rectangle;
rectangle=z0--z1--z2--z3--cycle;
picture X;
X = image(
drawoptions(withpen pencircle scaled 1.25 withcolor \MPcolor{orange});
draw (left--right) scaled 2;
draw (down--up) scaled 2;
drawoptions();
);
fill z0--z4--z3--cycle withcolor .5[red,green];
fill z1--z5--z2--cycle withcolor .5[red,green];
fill z0--z4--z5--z1--cycle withcolor 0.625white;
draw z0--z4--z3--cycle;
draw z1--z5--z2--cycle;
draw rectangle;
path a[];
a1 = subpath (0, 1) of rectangle shifted 10 down;
a2 = subpath (3, 4) of rectangle shifted 10 left;
a3 = subpath (2.26, 2.76) of rectangle shifted 13 up;
drawdblarrow a1; label.bot("$30$", point 1/2 of a1);
drawdblarrow a2; label.lft("$x+20$", point 1/2 of a2);
drawdblarrow a3; label.top("$x$", point 1/2 of a3);
draw X shifted z0;
draw X shifted z1;
draw X shifted z2;
draw X shifted z3;
draw X shifted z4;
draw X shifted z5;
label.ulft("B",z3);
label.urt("C",z2);
label.lrt("D",z1);
label.llft("A",z0);
label.top("E",z4);
label.top("F",z5);
\stopMPcode
\stoptext