Skip to content

Commit 4fa5223

Browse files
committed
added experimental option to series approximation
1 parent 663e360 commit 4fa5223

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

high.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ display_glitches = false
1010
auto_adjust_iterations = true
1111
probe_sampling = 3
1212
remove_centre = true
13-
export = "exr"
13+
export = "png"
14+
experimental = true

src/math/series_approximation.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ pub struct SeriesApproximation {
1717
pub valid_coefficients: Vec<ComplexExtended>,
1818
pub valid_iteration: usize,
1919
pub probe_sampling: usize,
20+
pub experimental: bool
2021
}
2122

2223
impl SeriesApproximation {
23-
pub fn new_central(c: &ComplexArbitrary, order: usize, maximum_iteration: usize, delta_pixel_square: FloatExtended, delta_top_left: ComplexExtended, probe_sampling: usize) -> Self {
24+
pub fn new_central(c: &ComplexArbitrary, order: usize, maximum_iteration: usize, delta_pixel_square: FloatExtended, delta_top_left: ComplexExtended, probe_sampling: usize, experimental: bool) -> Self {
2425
let mut coefficients = vec![vec![ComplexExtended::new2(0.0, 0.0, 0); order as usize + 1]; 1];
2526

2627
coefficients[0][0] = to_extended(&c);
@@ -39,6 +40,7 @@ impl SeriesApproximation {
3940
valid_coefficients: Vec::new(),
4041
valid_iteration: 1,
4142
probe_sampling,
43+
experimental
4244
}
4345
}
4446

src/renderer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ impl FractalRenderer {
4444
let zoom_scale_factor = settings.get_float("zoom_scale").unwrap_or(2.0);
4545
let display_glitches = settings.get_bool("display_glitches").unwrap_or(false);
4646
let auto_adjust_iterations = settings.get_bool("auto_adjust_iterations").unwrap_or(true);
47+
let experimental = settings.get_bool("experimental").unwrap_or(false);
4748
let probe_sampling = settings.get_int("probe_sampling").unwrap_or(3) as usize;
4849
let remove_centre = settings.get_bool("remove_centre").unwrap_or(true);
4950
let data_type = match settings.get_str("export").unwrap_or(String::from("COLOUR")).to_ascii_uppercase().as_ref() {
@@ -69,7 +70,8 @@ impl FractalRenderer {
6970
maximum_iteration,
7071
FloatExtended::new(0.0, 0),
7172
ComplexExtended::new2(0.0, 0.0, 0),
72-
probe_sampling);
73+
probe_sampling,
74+
experimental);
7375
let render_indices = (0..(image_width * image_height)).collect::<Vec<usize>>();
7476

7577
// Change the zoom level to the correct one for the frame offset

0 commit comments

Comments
 (0)