protected override _2DFractalHelper m_old_create_fractal_double_version(int width, int height) { ulong iter_count = f_iterations_count, iteration; _2DFractalHelper fractal_helper = new _2DFractalHelper(this, width, height); AbcissOrdinateHandler aoh = fractal_helper.AOH; ulong[][] matrix = fractal_helper.CommonMatrix; double[] abciss_points = fractal_helper.AbcissRealValues, ordinate_points = fractal_helper.OrdinateRealValues; double abciss_point,abciss_interval_length=_2df_get_double_abciss_interval_length(),ordinate_interval_length=_2df_get_double_ordinate_interval_length(), abciss_start=_2df_get_double_abciss_start(),ordinate_start=_2df_get_double_ordinate_start(); int percent_length = fractal_helper.PercentLength, current_percent = percent_length; Complex z = new Complex(), z0 = new Complex(); int fcp_width = width / _abciss_step_length + (width % _abciss_step_length!=0?1:0), fcp_height = height / _ordinate_step_length+(height%_ordinate_step_length!=0?1:0); FractalCloudPoint[][][] fcp=new FractalCloudPoint[fcp_width][][]; List<FractalCloudPoint> fcp_list = new List<FractalCloudPoint>(); FractalCloudPoint cfcp; for (; aoh.abciss < width; aoh.abciss++) { abciss_point = abciss_points[aoh.abciss]; if ((aoh.abciss % _abciss_step_length) == 0) fcp[aoh.abciss / _abciss_step_length] = new FractalCloudPoint[fcp_height][]; for (aoh.ordinate = 0; aoh.ordinate < height; aoh.ordinate++) { z0.Real = abciss_point; z0.Imagine = ordinate_points[aoh.ordinate]; z.Real = z0.Real; z.Imagine = z0.Imagine; iteration = 0; if ((aoh.abciss % _abciss_step_length) == 0 && (aoh.ordinate % _ordinate_step_length) == 0) { fcp_list.Clear(); for (; iteration < (ulong)_max_ammount_at_trace && (z.Real * z.Real + z.Imagine * z.Imagine) < _max_sqr_radius; iteration++) { z.tsqr(); z.Real += z0.Real; z.Imagine += z0.Imagine; cfcp = new FractalCloudPoint(); cfcp.AbcissLocation=(int)((z.Real-abciss_start)/abciss_interval_length); cfcp.OrdinateLocation=(int)((z.Imagine-ordinate_start)/ordinate_interval_length); fcp_list.Add(cfcp); } fcp[aoh.abciss / _abciss_step_length][aoh.ordinate / _ordinate_step_length] = fcp_list.ToArray(); } for (; iteration < iter_count && (z.Real * z.Real + z.Imagine * z.Imagine) < 4D; iteration++) { z.tsqr(); z.Real += z0.Real; z.Imagine += z0.Imagine; } matrix[aoh.abciss][aoh.ordinate] = iteration; } if ((--current_percent) == 0) { current_percent = percent_length; f_new_percent_in_parallel_activate(); } } fractal_helper.GiveUnique(new FractalCloudPoints(_max_ammount_at_trace,fcp)); return fractal_helper; }
/*_______________________________________________Перегруженные_методы_класса________________________________________________________________*/ #region Override methods protected override _2DFractalHelper m_old_create_fractal_double_version(int width, int height) { ulong iter_count = f_iterations_count, iteration; _2DFractalHelper fractal_helper = new _2DFractalHelper(this, width, height); AbcissOrdinateHandler aoh = fractal_helper.AOH; ulong[][] matrix = fractal_helper.CommonMatrix; double[] abciss_points = fractal_helper.AbcissRealValues, ordinate_points = fractal_helper.OrdinateRealValues; double abciss_point, abciss_interval_length = _2df_get_double_abciss_interval_length(), ordinate_interval_length = _2df_get_double_ordinate_interval_length(), abciss_start = _2df_get_double_abciss_start(), ordinate_start = _2df_get_double_ordinate_start(); int percent_length = fractal_helper.PercentLength, current_percent = percent_length; Complex z = new Complex(), z0 = new Complex(); int fcp_width = width / _abciss_step_length + (width % _abciss_step_length != 0?1:0), fcp_height = height / _ordinate_step_length + (height % _ordinate_step_length != 0?1:0); FractalCloudPoint[][][] fcp = new FractalCloudPoint[fcp_width][][]; List <FractalCloudPoint> fcp_list = new List <FractalCloudPoint>(); FractalCloudPoint cfcp; for (; aoh.abciss < width; aoh.abciss++) { abciss_point = abciss_points[aoh.abciss]; if ((aoh.abciss % _abciss_step_length) == 0) { fcp[aoh.abciss / _abciss_step_length] = new FractalCloudPoint[fcp_height][]; } for (aoh.ordinate = 0; aoh.ordinate < height; aoh.ordinate++) { z0.Real = abciss_point; z0.Imagine = ordinate_points[aoh.ordinate]; z.Real = z0.Real; z.Imagine = z0.Imagine; iteration = 0; if ((aoh.abciss % _abciss_step_length) == 0 && (aoh.ordinate % _ordinate_step_length) == 0) { fcp_list.Clear(); for (; iteration < (ulong)_max_ammount_at_trace && (z.Real * z.Real + z.Imagine * z.Imagine) < _max_sqr_radius; iteration++) { z.tsqr(); z.Real += z0.Real; z.Imagine += z0.Imagine; cfcp = new FractalCloudPoint(); cfcp.AbcissLocation = (int)((z.Real - abciss_start) / abciss_interval_length); cfcp.OrdinateLocation = (int)((z.Imagine - ordinate_start) / ordinate_interval_length); fcp_list.Add(cfcp); } fcp[aoh.abciss / _abciss_step_length][aoh.ordinate / _ordinate_step_length] = fcp_list.ToArray(); } for (; iteration < iter_count && (z.Real * z.Real + z.Imagine * z.Imagine) < 4D; iteration++) { z.tsqr(); z.Real += z0.Real; z.Imagine += z0.Imagine; } matrix[aoh.abciss][aoh.ordinate] = iteration; } if ((--current_percent) == 0) { current_percent = percent_length; f_new_percent_in_parallel_activate(); } } fractal_helper.GiveUnique(new FractalCloudPoints(_max_ammount_at_trace, fcp)); return(fractal_helper); }