Skip to content

Commit cb064a2

Browse files
authored
Merge pull request #31 from jackyarndley/development
Development
2 parents 7805775 + 43c0c98 commit cb064a2

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust_fractal"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
authors = ["jackyarndley <[email protected]>"]
55
description = "Fast, efficient mandelbrot set renderer."
66
edition = "2018"

high_experimental.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ image_height = 1080
33
rotate = 0
44
approximation_order = 64
55
glitch_percentage = 0.001
6-
frames = 1
6+
frames = 999
77
frame_offset = 0
88
zoom_scale = 2.0
99
display_glitches = false

src/renderer.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,9 @@ impl FractalRenderer {
330330
self.zoom.reduce();
331331

332332
if self.zoom.to_float() < 1e10 {
333-
self.series_approximation.valid_iteration_frame_multiplier = 0.0;
334-
self.series_approximation.valid_iteration_probe_multiplier = 0.0;
333+
// Set these to start from the beginning
334+
self.series_approximation.valid_iteration_frame_multiplier = 1.0;
335+
self.series_approximation.valid_iteration_probe_multiplier = 1.0;
335336

336337
// SA has some problems with precision with lots of terms at lot zoom levels
337338
if self.series_approximation.order > 8 {
@@ -353,6 +354,14 @@ impl FractalRenderer {
353354
self.center_reference.maximum_iteration = new_iteration_value;
354355
self.maximum_iteration = new_iteration_value;
355356
}
357+
} else {
358+
if self.series_approximation.min_valid_iteration < 1000 && self.series_approximation.order > 16 {
359+
self.series_approximation.order = 16;
360+
self.series_approximation.generate_approximation(&self.center_reference);
361+
} else if self.series_approximation.min_valid_iteration < 10000 && self.series_approximation.order > 32 {
362+
self.series_approximation.order = 32;
363+
self.series_approximation.generate_approximation(&self.center_reference);
364+
}
356365
}
357366

358367
self.remaining_frames -= 1;

0 commit comments

Comments
 (0)