# Generates random x and y coordinates in the 100x100 unit square (J. Lee, 9/1/98), # modified by John F. Raffensperger, 3 July 2006. param N default 25; # Number of points # AMPL chooses a seed based on the system clock, so its different each time. option randseed 0; param xcoord {1..N} := 100*Uniform01(); param ycoord {1..N} := 100*Uniform01(); printf "param N := %i;\n\n", N > random_points.txt; printf "param: xcoord\tycoord :=\n" >> random_points.txt; for {i in 1..N} printf "%i\t%f\t%f\n", i, xcoord[i], ycoord[i] >> random_points.txt; printf ";\n" >> random_points.txt; close random_points.txt; commands ..\makesvg_points.run; # Makes an SVG graph, so you can see it right away.