//AUTEUR: Guillaume Connan size(15cm,15cm); import animate; animation a; for (int k=6; k < 100; ++k) { save(); real t=180/k; pair o=(0,0); pair m=(cos(t),sin(t)); pair n=rotate(180-2*t,m)*o; pair b=rotate(4*t-180,n)*m; pair c=rotate(180-6*t,b)*n; pair nn=rotate(2*t-180,m)*o; pair bb=reflect(o,n)*b; pair mM=reflect(o,n)*m; path lo=m--n--b--nn--cycle; path t1=o--m--n--cycle; path t2=n--bb--c--cycle; path t3=o--mM--n--cycle; path t4=n--b--c--cycle; for (int i=0; i <= k; ++i){ filldraw(rotate(2*t*i,o)*t1,.5*(red+blue)); filldraw(rotate(2*t*i,o)*t2,.5*(red+blue)); filldraw(rotate(2*t*i,o)*t3,0.25(red+blue)); filldraw(rotate(2*t*i,o)*t4,0.25(red+blue)); filldraw(rotate(2*t*i,o)*lo,(red+blue)); }; a.add(); restore(); } a.movie(keep=true); // keep=true pour garder les images générées.