コード例 #1
0
 def test_arc(self):
     pt = Point((2,1))
     root = Arc(point = pt)
     root.left = Arc(point = Point ((1,0)))
     root.right = Arc(point = Point ((3, 0)))
     
     x = root.getLargestLeftDescendant()
     y = root.getSmallestRightDescendant()
     self.assertEquals ((1,0), (x.site.x, x.site.y))
     self.assertEquals ((3,0), (y.site.x, y.site.y))
コード例 #2
0
ファイル: test_fortune.py プロジェクト: AaronCHH/PG_ALG
    def test_arc(self):
        pt = Point((2, 1))
        root = Arc(point=pt)
        root.left = Arc(point=Point((1, 0)))
        root.right = Arc(point=Point((3, 0)))

        x = root.getLargestLeftDescendant()
        y = root.getSmallestRightDescendant()
        self.assertEquals((1, 0), (x.site.x, x.site.y))
        self.assertEquals((3, 0), (y.site.x, y.site.y))
コード例 #3
0
ファイル: test_fortune.py プロジェクト: AaronCHH/PG_ALG
 def test_bisectorIntersection(self):
     pt = Point((2, 1))
     arc = Arc(point=pt)
     y = arc.pointOnBisectionLine(5, 0)
     self.assertEquals(Point((5, 5.0)), y)
コード例 #4
0
 def test_bisectorIntersection(self):
     pt = Point((2,1))
     arc = Arc(point = pt)
     y = arc.pointOnBisectionLine(5,0)
     self.assertEquals (Point((5, 5.0)), y)