Skip to content

Commit 0327c83

Browse files
committed
Minor changes
1 parent b0e9d6b commit 0327c83

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

output.png

-1.34 MB
Loading

src/bin/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use rust_fractal::renderer::FractalRenderer;
33

44
fn main() {
55
println!("Mandelbrot Renderer");
6-
let center = (
7-
"-1.99996619445037030418434688506350579675531241540724851511761922944801584242342684381376129778868913812287046406560949864353810575744772166485672496092803920095332",
8-
"+0.00000000000000000000000000000000030013824367909383240724973039775924987346831190773335270174257280120474975614823581185647299288414075519224186504978181625478529");
9-
let zoom = 2.3620330788506154104770818136626E157;
6+
// let center = (
7+
// "-1.99996619445037030418434688506350579675531241540724851511761922944801584242342684381376129778868913812287046406560949864353810575744772166485672496092803920095332",
8+
// "+0.00000000000000000000000000000000030013824367909383240724973039775924987346831190773335270174257280120474975614823581185647299288414075519224186504978181625478529");
9+
// let zoom = 2.3620330788506154104770818136626E157;
1010

1111
// let center = (
1212
// "0.0",
@@ -48,10 +48,10 @@ fn main() {
4848
// "-0.000000000000000000000000000000000300138243679093832407249730397759249873468311907733352701742572801204749756148235811856472992884140755192241865049781816254785289455481579902975133989545509287024987599289178526901586954397865");
4949
// let zoom = 8.80307862787E167;
5050

51-
// let center = (
52-
// "-1.479796270901760024425279934770411525645551054432599517909807632824286254403907594526888466099962805022975196472549771681831234491695559852583955204986197762293872769474806903995564259040667568599770094383157857518790853771783314763231302599999999999999999999999998",
53-
// "-0.001199443952813447746281973233374468444560314114132538362037569205657422216739564521471119107626453330996365067987088146663639996715939831819152248618042255824652268918299630897525386638029428706473919823922522752497780934312003352081931299999999999999999999999998");
54-
// let zoom = 3.27799999998E235;
51+
let center = (
52+
"-1.479796270901760024425279934770411525645551054432599517909807632824286254403907594526888466099962805022975196472549771681831234491695559852583955204986197762293872769474806903995564259040667568599770094383157857518790853771783314763231302599999999999999999999999998",
53+
"-0.001199443952813447746281973233374468444560314114132538362037569205657422216739564521471119107626453330996365067987088146663639996715939831819152248618042255824652268918299630897525386638029428706473919823922522752497780934312003352081931299999999999999999999999998");
54+
let zoom = 3.27799999998E235;
5555

5656
// let center = (
5757
// "-0.74962449737876168207862620426836138684529527812364025754481571424558286479672801698750203976779135608148687747196595174858125388297577788573082753210469806739721377901297451172624762450940529814713048377873612297220313016947039287469999999999999999",

src/math/perturbation.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ impl Perturbation {
1010
pixel_data.par_chunks_mut(1)
1111
.for_each(|pixel_data| {
1212
for packet in pixel_data {
13+
// TODO investigate setting up a floatexp-type thing which only rescales every 500 or so iterations
14+
15+
// normal
1316
while packet.iteration < maximum_iteration {
1417
// This uses the difference between the starting iteration of the reference - can be used to skip some
1518
let z = packet.delta_current + reference.z_reference[packet.iteration - reference.start_iteration];
@@ -28,7 +31,7 @@ impl Perturbation {
2831
}
2932

3033
packet.derivative_current = 2.0 * z * packet.derivative_current + 1.0;
31-
packet.delta_current = 2.0 * &reference.z_reference[packet.iteration - reference.start_iteration] * packet.delta_current + packet.delta_current * packet.delta_current + packet.delta_reference;
34+
packet.delta_current = 2.0 * reference.z_reference[packet.iteration - reference.start_iteration] * packet.delta_current + packet.delta_current * packet.delta_current + packet.delta_reference;
3235
packet.iteration += 1;
3336
}
3437
}

0 commit comments

Comments
 (0)