예제 #1
0
  def test_edges(self):
    self.assertTrue(sol.in_poly(self.poly, (9, 5)))
    self.assertTrue(sol.in_poly(self.poly, (10, 5)))
    self.assertFalse(sol.in_poly(self.poly, (11, 5)))

    self.assertTrue(sol.in_poly(self.poly, (5, 1)))
    self.assertTrue(sol.in_poly(self.poly, (5, 0)))
    self.assertFalse(sol.in_poly(self.poly, (5, -1)))

    self.assertFalse(sol.in_poly(self.poly, (-1, 5)))
    self.assertTrue(sol.in_poly(self.poly, (0, 5)))
    self.assertTrue(sol.in_poly(self.poly, (1, 5)))
예제 #2
0
    def test_edges(self):
        self.assertTrue(sol.in_poly(self.poly, (9, 5)))
        self.assertTrue(sol.in_poly(self.poly, (10, 5)))
        self.assertFalse(sol.in_poly(self.poly, (11, 5)))

        self.assertTrue(sol.in_poly(self.poly, (5, 1)))
        self.assertTrue(sol.in_poly(self.poly, (5, 0)))
        self.assertFalse(sol.in_poly(self.poly, (5, -1)))

        self.assertFalse(sol.in_poly(self.poly, (-1, 5)))
        self.assertTrue(sol.in_poly(self.poly, (0, 5)))
        self.assertTrue(sol.in_poly(self.poly, (1, 5)))
예제 #3
0
    def test_edges(self):
        self.assertTrue(sol.in_poly(self.poly, (5, 4)))
        self.assertTrue(sol.in_poly(self.poly, (5, 5)))
        self.assertFalse(sol.in_poly(self.poly, (5, 6)))

        self.assertTrue(sol.in_poly(self.poly, (15, 4)))
        self.assertTrue(sol.in_poly(self.poly, (15, 5)))
        self.assertFalse(sol.in_poly(self.poly, (15, 6)))
예제 #4
0
  def test_edges(self):
    self.assertTrue(sol.in_poly(self.poly, (5, 4)))
    self.assertTrue(sol.in_poly(self.poly, (5, 5)))
    self.assertFalse(sol.in_poly(self.poly, (5, 6)))

    self.assertTrue(sol.in_poly(self.poly, (15, 4)))
    self.assertTrue(sol.in_poly(self.poly, (15, 5)))
    self.assertFalse(sol.in_poly(self.poly, (15, 6)))
예제 #5
0
 def test_in(self):
     self.assertTrue(sol.in_poly(self.poly, (5, 5)))
예제 #6
0
 def test_vertices(self):
     for point in self.poly:
         self.assertTrue(sol.in_poly(self.poly, point))
예제 #7
0
 def test_out(self):
     self.assertFalse(sol.in_poly(self.poly, (0, 10)))
     self.assertFalse(sol.in_poly(self.poly, (20, 10)))
예제 #8
0
 def test_in(self):
     self.assertTrue(sol.in_poly(self.poly, (10, 1)))
     self.assertTrue(sol.in_poly(self.poly, (3, 3)))
     self.assertTrue(sol.in_poly(self.poly, (18, 1)))
예제 #9
0
 def test_in(self):
   self.assertTrue(sol.in_poly(self.poly, (5, 5)))
예제 #10
0
 def test_vertices(self):
   for point in self.poly:
     self.assertTrue(sol.in_poly(self.poly, point))
예제 #11
0
 def test_out(self):
   self.assertFalse(sol.in_poly(self.poly, (0, 10)))
   self.assertFalse(sol.in_poly(self.poly, (20, 10)))
예제 #12
0
 def test_in(self):
   self.assertTrue(sol.in_poly(self.poly, (10, 1)))
   self.assertTrue(sol.in_poly(self.poly, (3, 3)))
   self.assertTrue(sol.in_poly(self.poly, (18, 1)))