Created
July 9, 2012 06:04
-
-
Save anonymous/3074475 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from point_class import Point | |
from quad_tree_class import QuadTree | |
import pprint | |
import sys | |
pt1 = Point(0,0) | |
points = [] | |
for i in range(-2,1): | |
for j in range(-2,1): | |
if i is 0 and j is 0: | |
continue | |
tmp = Point(i,j) | |
points.append(tmp) | |
#for pt in points: | |
# print pt | |
qt = QuadTree(pt1) | |
for pt in points: | |
try: | |
qt.insert(pt) | |
except: | |
"That point already exists in the tree. Try harder." | |
print qt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment