Example #1
0
        List <EdgeFortune> MakeVoronoiGraph(List <PointF> myListPoints, int width, int height)
        {
            List <PointFortune> listPointsFortune = new List <PointFortune>();

            for (int i = 0; i < myListPoints.Count; i++)
            {
                listPointsFortune.Add(new PointFortune(myListPoints[i].X, myListPoints[i].Y, i));
            }
            PointFortune max = new PointFortune(0, 0, 0);
            PointFortune min = new PointFortune(width, height, 0);

            return(voronoi.GenerateVoronoi(listPointsFortune));
        }
Example #2
0
        List <EdgeFortune> MakeVoronoiGraph(List <PointF> myListPoints, int width, int height)
        {
            List <VertexKDTree> listPointsFortune = new List <VertexKDTree>();

            for (int i = 0; i < myListPoints.Count; i++)
            {
                listPointsFortune.Add(new VertexKDTree(new Vector3(myListPoints[i].X, myListPoints[i].Y, i), 0));
            }
            VertexKDTree max = new VertexKDTree(new Vector3(0, 0, 0), 0);
            VertexKDTree min = new VertexKDTree(new Vector3(width, height, 0), 0);

            return(voronoi.GenerateVoronoi(listPointsFortune));
        }