void Cpg_Circ(double xcent, double ycent, double radius) /* void cpgcirc(float xcent, float ycent, float radius); */ { cpgcirc((float)xcent, (float)ycent, (float)radius); return; }
void markcatobj(Secat object) { cpgsci(2); cpgsfs(2); cpgslw(3); cpgcirc(object.x,object.y,3.0*object.fwhm); cpgsci(1); cpgslw(1); }
static void demo3() { #define TWOPI (2.0*3.14159265) #define NPOL 6 int i, j, k; int n1[] = {3, 4, 5, 5, 6, 8}; int n2[] = {1, 1, 1, 2, 1, 3}; float x[10], y[10], y0; char* lab[] = {"Fill style 1 (solid)", "Fill style 2 (outline)", "Fill style 3 (hatched)", "Fill style 4 (cross-hatched)"}; /* Initialize the viewport and window. */ cpgbbuf(); cpgsave(); cpgpage(); cpgsvp(0.0, 1.0, 0.0, 1.0); cpgwnad(0.0, 10.0, 0.0, 10.0); /* Label the graph. */ cpgsci(1); cpgmtxt("T", -2.0, 0.5, 0.5, "PGPLOT fill area: routines cpgpoly(), cpgcirc(), cpgrect()"); /* Draw assorted polygons. */ for (k=1; k<5; k++) { cpgsci(1); y0 = 10.0 -2.0*k; cpgtext(0.2, y0+0.6, lab[k-1]); cpgsfs(k); for (i=0; i<NPOL; i++) { cpgsci(i+1); for (j=0; j<n1[i]; j++) { x[j] = i+1 + 0.5*cos(n2[i]*TWOPI*j/n1[i]); y[j] = y0 + 0.5*sin(n2[i]*TWOPI*j/n1[i]); } cpgpoly(n1[i], x, y); } cpgsci(7); cpgshs(0.0, 1.0, 0.0); cpgcirc(7.0, y0, 0.5); cpgsci(8); cpgshs(-45.0, 1.0, 0.0); cpgrect(7.8, 9.5, y0-0.5, y0+0.5); } cpgunsa(); cpgebuf(); return; }
/* * Class: pulsarhunter_PgplotInterface * Method: pgcirc * Signature: (FFF)V */ JNIEXPORT void JNICALL Java_pulsarhunter_PgplotInterface_pgcirc (JNIEnv *env, jclass cl, jfloat x, jfloat y , jfloat r){ cpgcirc(x,y,r); }
/* draw a circle, using fill-area attributes */ static void _pgcirc (double *x, double *y, double *a) { cpgcirc ((float) *x, (float) *y, (float) *a); }