예제 #1
0
        void Triangulate(int n, double size)
        {
            var random = new Random(n);
            var w      = n * size;
            var cdt    = new Cdt(PointsForCdt(random, n, w), null, SegmentsForCdt(w).ToList());

            cdt.Run();
#if TEST_MSAGL && TEST_MSAGL
            CdtSweeper.ShowFront(cdt.GetTriangles(), null, null, null);
#endif
        }
예제 #2
0
        static void Triangulation(bool reverseX)
        {
#if TEST_MSAGL
            DisplayGeometryGraph.SetShowFunctions();
#endif
            int r = reverseX ? -1 : 1;
            IEnumerable <Point> points = Points().Select(p => new Point(r * p.X, p.Y));

            var poly = (Polyline)RussiaPolyline.GetTestPolyline().ScaleFromOrigin(1, 1);
            var cdt  = new Cdt(null, new[] { poly }, null);
            cdt.Run();
#if TEST_MSAGL
            CdtSweeper.ShowFront(cdt.GetTriangles(), null, null, null);
#endif
        }