made a simplex class, going to move this into the face class to simplify

This commit is contained in:
Stephen Mardson McQuay
2010-02-21 19:02:45 -07:00
parent 6c4c6d4cfe
commit 0ef6897aee
4 changed files with 40 additions and 33 deletions
-28
View File
@@ -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
View File
@@ -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'))