@@ -42,7 +42,6 @@ pub struct FractalRenderer {
42
42
pub pixel_data_type : DataType ,
43
43
pub jitter : bool ,
44
44
pub jitter_factor : f64 ,
45
- pub experimental : bool ,
46
45
show_output : bool ,
47
46
pub progress : ProgressCounters ,
48
47
pub render_time : u128 ,
@@ -68,8 +67,11 @@ impl FractalRenderer {
68
67
let frame_offset = settings. get_int ( "frame_offset" ) . unwrap_or ( 0 ) as usize ;
69
68
let zoom_scale_factor = settings. get_float ( "zoom_scale" ) . unwrap_or ( 2.0 ) ;
70
69
let display_glitches = settings. get_bool ( "display_glitches" ) . unwrap_or ( false ) ;
70
+
71
71
let auto_adjust_iterations = settings. get_bool ( "auto_adjust_iterations" ) . unwrap_or ( true ) ;
72
- let experimental = settings. get_bool ( "experimental" ) . unwrap_or ( false ) ;
72
+ let series_approximation_tiled = settings. get_bool ( "series_approximation_tiled" ) . unwrap_or ( true ) ;
73
+ let series_approximation_enabled = settings. get_bool ( "series_approximation_enabled" ) . unwrap_or ( true ) ;
74
+
73
75
let probe_sampling = settings. get_int ( "probe_sampling" ) . unwrap_or ( 3 ) as usize ;
74
76
let remove_centre = settings. get_bool ( "remove_centre" ) . unwrap_or ( false ) ;
75
77
@@ -176,7 +178,8 @@ impl FractalRenderer {
176
178
maximum_iteration,
177
179
FloatExtended :: new ( 0.0 , 0 ) ,
178
180
probe_sampling,
179
- experimental,
181
+ series_approximation_tiled,
182
+ series_approximation_enabled,
180
183
valid_iteration_probe_multiplier,
181
184
data_storage_interval,
182
185
fractal_type) ;
@@ -237,7 +240,6 @@ impl FractalRenderer {
237
240
pixel_data_type,
238
241
jitter,
239
242
jitter_factor,
240
- experimental,
241
243
show_output,
242
244
progress : ProgressCounters :: new ( maximum_iteration) ,
243
245
render_time : 0 ,
@@ -302,7 +304,7 @@ impl FractalRenderer {
302
304
tx. send ( ( ) ) . unwrap ( ) ;
303
305
return ;
304
306
} ;
305
-
307
+
306
308
self . series_approximation . maximum_iteration = self . center_reference . current_iteration ;
307
309
self . series_approximation . generate_approximation ( & self . center_reference , & self . progress . series_approximation , & stop_flag) ;
308
310
} else {
@@ -322,7 +324,7 @@ impl FractalRenderer {
322
324
drop ( export) ;
323
325
324
326
// Check to see if the series approximation order has changed intraframe
325
- if self . series_approximation . order != ( self . series_approximation . coefficients [ 0 ] . len ( ) - 1 ) {
327
+ if self . series_approximation . enabled && self . series_approximation . order != self . series_approximation . generated_order {
326
328
self . series_approximation . min_valid_iteration = 1 ;
327
329
self . series_approximation . generate_approximation ( & self . center_reference , & self . progress . series_approximation , & stop_flag) ;
328
330
}
@@ -360,13 +362,12 @@ impl FractalRenderer {
360
362
-self . zoom . exponent ,
361
363
cos_rotate,
362
364
sin_rotate,
363
- delta_pixel,
365
+ delta_pixel,
364
366
self . image_width ,
365
367
self . image_height ,
366
368
& self . center_reference ,
367
369
& self . progress . series_validation ) ;
368
370
369
- // -1 because we already know that 1 iteration can be skipped (take z = c)
370
371
self . progress . min_series_approximation . store ( self . series_approximation . min_valid_iteration , Ordering :: SeqCst ) ;
371
372
self . progress . max_series_approximation . store ( self . series_approximation . max_valid_iteration , Ordering :: SeqCst ) ;
372
373
@@ -402,8 +403,8 @@ impl FractalRenderer {
402
403
let mut i = ( index % self . image_width ) as f64 ;
403
404
let mut j = ( index / self . image_width ) as f64 ;
404
405
405
- let chosen_iteration = if self . fractal_type == FractalType :: Mandelbrot2 {
406
- if self . experimental {
406
+ let chosen_iteration = if self . series_approximation . enabled {
407
+ if self . series_approximation . tiled {
407
408
let test1 = ( i * sampling_resolution_width) . floor ( ) as usize ;
408
409
let test2 = ( j * sampling_resolution_height) . floor ( ) as usize ;
409
410
@@ -809,7 +810,10 @@ impl FractalRenderer {
809
810
self . zoom_scale_factor = settings. get_float ( "zoom_scale" ) . unwrap_or ( 2.0 ) ;
810
811
self . data_export . lock ( ) . display_glitches = settings. get_bool ( "display_glitches" ) . unwrap_or ( false ) ;
811
812
self . auto_adjust_iterations = settings. get_bool ( "auto_adjust_iterations" ) . unwrap_or ( true ) ;
812
- self . experimental = settings. get_bool ( "experimental" ) . unwrap_or ( false ) ;
813
+
814
+ let series_approximation_tiled = settings. get_bool ( "series_approximation_tiled" ) . unwrap_or ( true ) ;
815
+ let series_approximation_enabled = settings. get_bool ( "series_approximation_enabled" ) . unwrap_or ( true ) ;
816
+
813
817
let probe_sampling = settings. get_int ( "probe_sampling" ) . unwrap_or ( 3 ) as usize ;
814
818
self . remove_centre = settings. get_bool ( "remove_centre" ) . unwrap_or ( true ) ;
815
819
@@ -878,7 +882,8 @@ impl FractalRenderer {
878
882
self . maximum_iteration ,
879
883
FloatExtended :: new ( 0.0 , 0 ) ,
880
884
probe_sampling,
881
- self . experimental ,
885
+ series_approximation_tiled,
886
+ series_approximation_enabled,
882
887
valid_iteration_probe_multiplier,
883
888
data_storage_interval,
884
889
self . fractal_type ) ;
0 commit comments