Skip to content

Commit 17c2c0f

Browse files
committed
more changes to make old files work
1 parent 2dee69f commit 17c2c0f

File tree

8 files changed

+16
-24
lines changed

8 files changed

+16
-24
lines changed

default.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image_width = 1000
22
image_height = 1000
33
rotate = 0
44
approximation_order = 0
5-
glitch_tolerance = 0.001
5+
glitch_percentage = 0.001
66
frames = 1
77
frame_offset = 0
88
zoom_scale = 2.0

high.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image_width = 1920
22
image_height = 1080
33
rotate = 0
44
approximation_order = 48
5-
glitch_tolerance = 0.001
5+
glitch_percentage = 0.001
66
frames = 1
77
frame_offset = 0
88
zoom_scale = 2.0

high_experimental.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ glitch_percentage = 0.001
66
frames = 1
77
frame_offset = 0
88
zoom_scale = 2.0
9-
display_glitches = true
9+
display_glitches = false
1010
auto_adjust_iterations = true
1111
probe_sampling = 12
12-
remove_centre = false
12+
remove_centre = true
1313
export = "png"
1414

1515
# By default this is squared tolerance. 1e-6 works normally, 1.4e-6 is low tolerance.
@@ -19,5 +19,4 @@ glitch_tolerance = 1.4e-6
1919
experimental = true
2020
high_precision_data_interval = 100
2121
valid_iteration_frame_multiplier = 0.75
22-
valid_iteration_probe_multiplier = 0.98
23-
22+
valid_iteration_probe_multiplier = 0.98

locations/super_dense.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
real = "-1.94151209635203446394399999999999999999995"
2+
imag = "0.00663498740113024706519999999999999999995"
3+
zoom = "1.53916775627E16"
4+
iterations = 10000000

low.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image_width = 500
22
image_height = 500
33
rotate = 0
44
approximation_order = 16
5-
glitch_tolerance = 0.001
5+
glitch_percentage = 0.001
66
frames = 1
77
frame_offset = 0
88
zoom_scale = 2.0

src/math/series_approximation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl SeriesApproximation {
173173
let mut valid_iterations_array = Vec::new();
174174
valid_iterations_array.push(first_valid_iterations);
175175

176-
let new_start_iterations = (first_valid_iterations as f32 * self.valid_iteration_probe_multiplier) as usize;
176+
let new_start_iterations = max(1, (first_valid_iterations as f32 * self.valid_iteration_probe_multiplier) as usize);
177177

178178
// we now have a value for valid iterations, lets do the rest of the probes, but with 0.95 * that iteration
179179

src/renderer.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,14 @@ impl FractalRenderer {
207207
);
208208

209209
let chosen_iteration = if self.experimental {
210-
let mut test1 = ((self.series_approximation.probe_sampling - 1) as f64 * i as f64 / self.image_width as f64).floor() as usize;
211-
let mut test2 = ((self.series_approximation.probe_sampling - 1) as f64 * j as f64 / self.image_height as f64).floor() as usize;
212-
213-
if test1 >= (self.series_approximation.probe_sampling - 1) {
214-
test1 -= 1;
215-
}
216-
217-
if test2 >= (self.series_approximation.probe_sampling - 1) {
218-
test2 -= 1;
219-
}
210+
let test1 = ((self.series_approximation.probe_sampling - 1) as f64 * i as f64 / self.image_width as f64).floor() as usize;
211+
let test2 = ((self.series_approximation.probe_sampling - 1) as f64 * j as f64 / self.image_height as f64).floor() as usize;
220212

221213
let pos1 = test1 * self.series_approximation.probe_sampling + test2;
222214
let pos2 = test1 * self.series_approximation.probe_sampling + test2 + 1;
223215
let pos3 = test1 * self.series_approximation.probe_sampling + test2 + self.series_approximation.probe_sampling;
224216
let pos4 = test1 * self.series_approximation.probe_sampling + test2 + self.series_approximation.probe_sampling + 1;
225217

226-
// println!("{}, {}, {}, {}", i, j, test1, test2);
227-
228218
[self.series_approximation.valid_iterations[pos1],
229219
self.series_approximation.valid_iterations[pos2],
230220
self.series_approximation.valid_iterations[pos3],
@@ -246,8 +236,6 @@ impl FractalRenderer {
246236
derivative_current: ComplexFixed::new(1.0, 0.0),
247237
glitched: false,
248238
escaped: false,
249-
series_approximation_delta: new_delta,
250-
series_approximation_iteration: chosen_iteration
251239
}
252240
}).collect::<Vec<PixelData>>();
253241

@@ -327,6 +315,9 @@ impl FractalRenderer {
327315
self.zoom.reduce();
328316

329317
if self.zoom.to_float() < 1e10 {
318+
self.series_approximation.valid_iteration_frame_multiplier = 0.0;
319+
self.series_approximation.valid_iteration_probe_multiplier = 0.0;
320+
330321
// SA has some problems with precision with lots of terms at lot zoom levels
331322
if self.series_approximation.order > 8 {
332323
// Overwrite the series approximation order

src/util/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,4 @@ pub struct PixelData {
163163
pub derivative_current: ComplexFixed<f64>,
164164
pub glitched: bool,
165165
pub escaped: bool,
166-
pub series_approximation_delta: ComplexExtended,
167-
pub series_approximation_iteration: usize
168166
}

0 commit comments

Comments
 (0)