18 Nov 2007

Official Asymptote example – star

Figure 0223
(Compiled with Asymptote version 2.14svn-r5318)
/* This code comes from The Official Asymptote Gallery */
    
size(100);
import math;

int n=5;
path p;

int i=0;
do {
  p=p--unityroot(n,i);
  i=(i+2) % n;
} while(i != 0);

filldraw(p--cycle,red+evenodd);

Étiquettes : , , , ,