File:Eps32x22ringVector.jpg

Example of the vector graphics in EPS.

The black circle is plotted with the EPS command arc.

The red cross is drawn with the EPS commands moveto, lineto, stroke (simplified to M, L, S in the definitions in the beginning of the file).

The image should be compared to the roster version of such a ring at.

EPS version of the file
The two empty lines and the spacebar at the beginning of lines are introduced to improve the formatting at TORI and simplify the loading, they do not affect the view and conversion of this file to other formats.

%!PS-Adobe-2.0 EPSF-2.0

%%BoundingBox: 0 0 322 222

/RGB {setrgbcolor} bind def /W {setlinewidth} bind def /M {moveto} bind def /L {lineto} bind def /C {closepath} bind def /S {stroke} bind def 1 1 translate 10 10 scale 16.000 11.000 10 0 360 arc C 2 W S 16.000 -1.000 M  16.000 23.000 L  -1.000 11.000 M  33.000 11.000 L  1 0 0 RGB .3 W S showpage %%Trailer

C++ generator
//The image above is generated with the code below. All the routines are included, no additional files should be loaded for the compilation.

void ado(FILE *O, int X, int Y) {fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%'); fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y); //fprintf(O,"/times-Roman findfont 20 scalefont setfont\n"); fprintf(O,"/RGB {setrgbcolor} bind def\n"); fprintf(O,"/W {setlinewidth} bind def\n"); fprintf(O,"/M {moveto} bind def\n"); fprintf(O,"/L {lineto} bind def\n"); fprintf(O,"/C {closepath} bind def\n"); fprintf(O,"/S {stroke} bind def\n"); }
 * 1) include
 * 2) include
 * 3) include
 * 4) define DB double


 * 1) define DO(x,y) for(x=0;x=0;n--) { fprintf(o,"\n "); DO(m,M){ fprintf(o,"%1x",int(15.*a[n*M+m]+.5) ); }} fprintf(o,"\n >\n "); fprintf(o,"image\n "); free(a); fprintf(o,"grestore\n "); */

fprintf(o," %6.3f %6.3f 10 0 360 arc C 2 W S\n ",M/2.,N/2.);

M(M/2.,-1); L(M/2.,N+1); M(-1,N/2.); L(M+1,N/2.); fprintf(o," 1 0 0 RGB .3 W S\n "); fprintf(o,"showpage\n%c%cTrailer\n",'%','%'); fclose(o); system("epstopdf eps32x22ringVector.eps"); //system(   "open eps32x22ringVector.pdf"); system( "convert eps32x22ringVector.eps eps32x22ringVector.jpg "); system(   "open eps32x22ringVector.jpg"); }
 * 1) define M(x,y) fprintf(o," %6.3f %6.3f M\n ",0.+x,0.+y);
 * 2) define L(x,y) fprintf(o," %6.3f %6.3f L\n ",0.+x,0.+y);

//The part generating the roster image in the code above is suppressed.

Keywords
Some of commands of C++ and EPS used above are listed below:

EPS, vector graphics, C++,

BoundingBox,

fopen, fclose, fprintf, system

epstopdf, convert