コード例 #1
0
        /// <summary>
        /// Main method, that activates convex hull scan
        /// File start.bat passes names of input and output files
        /// </summary>
        /// <param name="args">Input png file with black points on white background (if not exists - points will be generated),
        /// Output file (txt file in which will be recorded the points and the convex hull)</param>
        public static void Main(string[] args)
        {
            IOpenImage      open   = GetOpenFileStrategy(args);
            IConvexHullScan scan   = new JarvisMatch();
            IOutput         output = GetOutputStrategy(args);

            Console.WriteLine("Processing started...");

            try
            {
                new ConvexHullControl(open, scan, output);
            }
            catch (Exception e)
            {
                Console.WriteLine($"An error has occured: {e.Message}");
            }

            Console.WriteLine("Processing is over. Press Enter to exit.");
            Console.ReadLine();
        }
コード例 #2
0
        void JMCH(double n, Object o)
        {
            JarvisMatch JM = new JarvisMatch();

            JM.ConvexHull((IPositionSet)o);
        }