e3 = Edge(p3, p4)
e4 = Edge(p4, p5)
e5 = Edge(p5, p1)
es = set([e1, e2, e3, e4, e5])

poly = Polygon(ps, es)

i1 = Point(0.2, 0.5)
i2 = Point(0.4, 0.5)
i3 = Point(1.5, 0.5)
i4 = Point(0.5, 0.3)
i5 = Point(0.5, 0.7)
ins = set([i1, i2, i3, i4, i5])

for point in find_interior_points([ins], [poly]):
	print point_string(point)
print

p1 = Point(0.0, 0.0)
p2 = Point(0.0, 1.0)
p3 = Point(1.0, 1.0)
p4 = Point(1.0, 0.0)
p5 = Point(0.6, 0.5)
p6 = Point(0.4, 0.5)
ps = set([p1, p2, p3, p4, p5, p6])

e1 = Edge(p1, p2)
e2 = Edge(p2, p3)
e3 = Edge(p3, p4)
e4 = Edge(p4, p5)
e5 = Edge(p5, p6)
from Planner import Edge
from Planner import Polygon
from Planner import visibility_graph
from Planner import point_string
from Planner import edge_string


start = Point(0.0, 5.0)
goal = Point(10.0, 5.0)

point_1 = Point(2.5, 2.5)
point_2 = Point(2.5, 7.5)
point_3 = Point(7.5, 7.5)
point_4 = Point(7.5, 2.5)
point_list = [ point_1, point_2, point_3, point_4 ]

edge_1 = Edge(point_1, point_2)
edge_2 = Edge(point_2, point_3)
edge_3 = Edge(point_3, point_4)
edge_4 = Edge(point_4, point_1)
edge_list = [ edge_1, edge_2, edge_3, edge_4 ]

rect = Polygon(point_list, edge_list)

graph = visibility_graph([rect], start, goal)

for vertex in graph[0]:
	print point_string(vertex)

for edge in graph[1]:
	print edge_string(edge)