Exemple #1
0
        private List <ChartValuePoint> Get_Data1()
        {
            List <double> val_list = new List <double>();

            for (int i = 0; i < 100; ++i)
            {
                val_list.Add(0);
            }

            Random rd = new Random();

            for (int i = 0; i < 3000; ++i)
            {
                double r = rd.NextDouble() * 50;
                double w = rd.NextDouble() * Math.PI * 2;
                double x = r * Math.Sin(w) + 50;

                int index = (int)x;

                ++val_list[index];
            }

            List <ChartValuePoint> point_list = new List <ChartValuePoint>();

            for (int i = 0; i < val_list.Count; ++i)
            {
                ChartValuePoint cvp = new ChartValuePoint(1, 1.0 * i, val_list[i]);
                point_list.Add(cvp);
            }

            return(point_list);
        }
Exemple #2
0
        private List <ChartValuePoint> Get_Data0()
        {
            List <ChartValuePoint> list = new List <ChartValuePoint>();
            Random rd = new Random();

            for (int i = 0; i < 5000; ++i)
            {
                double r2 = rd.NextDouble() * 2500;
                double r = rd.NextDouble() * 50;
                double w = rd.NextDouble() * Math.PI * 2;
                double x = r * Math.Sin(w), y = r * Math.Cos(w);

                ChartValuePoint cvp = new ChartValuePoint(0, x + 50, y + 50);
                list.Add(cvp);
            }

            return(list);
        }