Пример #1
0
        private static IEnumerable <Point> ProcessPoints(Point[] points, string fileName)
        {
            var vd      = new VoronoiDiagram(points);
            var centers = vd.Calculate();

            using (var file = new StreamWriter(fileName)) {
                foreach (var p in centers)
                {
                    file.WriteLine("{0} {1}", p.X, p.Y);
                }
            }
            return(centers);
        }
Пример #2
0
 private static IEnumerable<Point> ProcessPoints(Point[] points, string fileName)
 {
     var vd = new VoronoiDiagram(points);
     var centers = vd.Calculate();
     using (var file = new StreamWriter(fileName)) {
         foreach (var p in centers)
             file.WriteLine("{0} {1}", p.X, p.Y);
     }
     return centers;
 }