made a simplex class, going to move this into the face class to simplify
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import pickle
|
||||
|
||||
from grid import simple_rect_grid, simple_random_grid
|
||||
|
||||
pfile = '/tmp/grid_random.p'
|
||||
qfile = '/tmp/grid_random.txt'
|
||||
MAX_POINTS = 200
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.setrecursionlimit(4096)
|
||||
print sys.getrecursionlimit()
|
||||
try:
|
||||
total_points = int(sys.argv[1])
|
||||
except:
|
||||
total_points = 10
|
||||
|
||||
if total_points > MAX_POINTS:
|
||||
print "too many points"
|
||||
sys.exit(1)
|
||||
|
||||
g = simple_random_grid(total_points)
|
||||
g.construct_connectivity()
|
||||
print g
|
||||
open(qfile, 'w').write(g.for_qhull())
|
||||
pickle.dump(g, open(pfile, 'w'))
|
||||
+2
-3
@@ -5,7 +5,6 @@ import pickle
|
||||
|
||||
from grid import simple_rect_grid, simple_random_grid
|
||||
|
||||
pfile = '/tmp/grid_regular.p'
|
||||
qfile = '/tmp/grid_regular.txt'
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -17,6 +16,6 @@ if __name__ == '__main__':
|
||||
resolution = 3
|
||||
|
||||
g = simple_rect_grid(resolution, resolution)
|
||||
g.construct_connectivity()
|
||||
print g
|
||||
print g.get_points_conn([0.4, 0])
|
||||
open(qfile, 'w').write(g.for_qhull())
|
||||
pickle.dump(g, open(pfile, 'w'))
|
||||
|
||||
Reference in New Issue
Block a user