private Plot.Point[] GetRandomData(int xmin, int xmax, int ymin, int ymax, int n) { Plot.Point[] points = new Plot.Point[n]; Random random = new Random(); for (int i = n - 1; i >= 0; i--) { points[i] = new Plot.Point(random.Next(xmin, xmax), random.Next(ymin, ymax)); //points[i] = new Plot.Point(i, random.Next(min, max)); } return(points); }
private Plot.Point[] GetFakeLinData(int min, int max, int volatility, int n) { Plot.Point[] points = new Plot.Point[n]; Random random = new Random(); double last = random.NextDouble() * (Math.Abs(min) + Math.Abs(max)) - Math.Abs(min); for (int i = 0; i < n; i++) { last += random.NextDouble() * volatility; points[i] = new Plot.Point(i, (float)(last + last)); //points[i] = new Plot.Point(i, random.Next(min, max)); } return(points); }