/* quick and dirty PostScript graph drawing for the connection graph */ #include main(argc, argv) char *argv[]; { int p, q; float dist, xp, yp, xq, yq; printf("%%!PS\n"); printf("/Palatino-Roman findfont\n"); printf("10 scalefont\n"); printf("setfont\n"); printf("0.25 setlinewidth\n"); printf("/sc { 5.0 mul } def\n"); printf("19 sc 45 sc moveto\n"); printf("stroke\n"); while(scanf("%f %d %d %f %f %f %f", &dist, &p, &q, &xp, &yp, &xq, &yq) == 7) { printf("%f sc %f sc moveto %f sc %f sc lineto stroke\n", xp, yp, xq, yq); } printf("showpage\n"); }