Пример #1
0
        public List<XYData> GetPoints(double xStart, double xEnd, double yStart, double yEnd)
        {
            int TestedIterations;
            List<XYData> resultList = new List<XYData>();
            double i;
            double j;
            for (i = xStart; i < xEnd; i += Precision)
            {
                for (j = yStart; j < yEnd; j += Precision)
                {
                    XYData xy = new XYData();
                    xy.IsMandelbrotMember = IsMandelbrotSetMember(i, j, out TestedIterations);
                    xy.XValue = i;
                    xy.YValue = j;
                    xy.Iterations = TestedIterations;
                    resultList.Add(xy);
                }
            }

            return resultList;
        }
Пример #2
0
 /// <summary>
 /// This function gets all the Mandelbrot set's members or ys (imaginary components) for a specific x (real component)
 /// </summary>
 /// <param name="x">Real component</param>
 /// <param name="yStart">The beginning of the y criteria to be tested</param>
 /// <param name="yEnd">The end of the y criteria to be tested</param>
 /// <returns>List of points with the value of x and all corresponding ys indicating the status of each of in terms of Mandelbrot's membership</returns>
 private List<XYData> GetPointsForX(double x, double yStart, double yEnd)
 {
     int TestedIterations;
     List<XYData> resultList = new List<XYData>();
     for (double j = yStart; j < yEnd; j += Precision)
     {
         XYData xy = new XYData();
         xy.IsMandelbrotMember = IsMandelbrotSetMember(x, j, out TestedIterations);
         xy.XValue = x;
         xy.YValue = j;
         xy.Iterations = TestedIterations;
         resultList.Add(xy);
     }
     return resultList;
 }