% change file to test uniformly distributed coordinates in hull algorithms @x \nocon @y \nocon \let\maybe=\iffalse \def\title{\expandafter\uppercase\expandafter{\jobname\ (uniform points)}} @z @x #include "gb_graph.h" @y #include "gb_graph.h" #include "gb_rand.h" @z @x main() { @@; Graph *g=miles(128,0,0,0,0,0,0); @# @y main(argc,argv) int argc; char **argv; { @@; Graph *g; int kk; char str[10]; @# if (argc!=2) n=100; else if (sscanf(argv[1],"%d",&n)!=1) { printf("Usage: %s [n]\n",argv[0]);@+exit(1); } else if (n<20) { printf("n should be at least 20!\n");@+exit(1); } g=gb_new_graph(n); gb_init_rand(0); for (kk=0,v=g->vertices; kkname=gb_save_string(str); v->x.I=gb_next_rand()&0xffff; v->y.I=gb_next_rand()&0xffff; if (n<150) printf("point %s=(%d,%d)\n",v->name,v->x.I,v->y.I); } @z