// This generates a circle. d = 2. #include #include "l.h" #define vc 360 R a[vc][2]; short l[vc][2]; bp g2(){ R const tpi = 2.*3.1415926535897932385; {int j=vc; while(j--) { a[j][0] = cos(j*tpi/vc); a[j][1] = sin(j*tpi/vc); l[j][0] = j; l[j][1] = j+1;} l[vc-1][1] = 0;} return (bp){2, vc, (R*)a, vc, (short*)l};} static R wh[] = {1, -1}; static short c[] = {0, 1}; bp g1(){return (bp){1, 2, wh, 2, c};} // routine gx returns a zero brane with a boundary. // This is helpful in debugging. bp gx(){return (bp){1, 1, wh+1, 1, c};}