Exemple #1
0
        /**
         * Creates object
         * Runs
         * Outputs
         * Uses manual set (for testing, mainly)
         */

        public static VoronoiOutput Run(int width, int height, Point2D[] values)
        {
            var fortune = new Fortunes
            {
                ImageWidth  = width,
                ImageHeight = height
            };

            //Run
            fortune.GenerateVoronoi(values);

            return(new VoronoiOutput(fortune._allEdges, values));
        }
Exemple #2
0
        /**
         * Creates object
         * Runs
         * Outputs
         */

        public static VoronoiOutput Run(int width, int height, int siteCount)
        {
            var fortune = new Fortunes
            {
                ImageWidth  = width,
                ImageHeight = height
            };

            var values = GetSet(siteCount, width, height);

            //Run
            fortune.GenerateVoronoi(values);

            return(new VoronoiOutput(fortune._allEdges, values));
        }