Esempio n. 1
0
 public void GetVoronoiCells()
 {
     using var enumerator = delaunator.GetVoronoiCells().GetEnumerator();
     while (enumerator.MoveNext())
     {
     }
 }
    public static IEnumerable <Poly> GetVoroni(this IEnumerable <IPoint> points)
    {
        var delauney = new Delaunator(points.ToArray());

        var voroni = delauney.GetVoronoiCells();

        return(voroni.Select(vor => new Poly()
        {
            Points = vor.Points.ToPointCollection(),
            Index = vor.Index
        }));
    }