22 lines
411 B
Python
Executable File
22 lines
411 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import sys
|
|
import pickle
|
|
|
|
from grid import simple_rect_grid, simple_random_grid
|
|
|
|
qfile = '/tmp/grid_regular.txt'
|
|
|
|
if __name__ == '__main__':
|
|
try:
|
|
resolution = int(sys.argv[1])
|
|
if resolution > 200:
|
|
raise Exception
|
|
except:
|
|
resolution = 3
|
|
|
|
g = simple_rect_grid(resolution, resolution)
|
|
print g
|
|
print g.get_points_conn([0.4, 0])
|
|
open(qfile, 'w').write(g.for_qhull())
|