Skip to content

Commit bfd5644

Browse files
committed
fixed the tiled series approximation
1 parent 07badcf commit bfd5644

File tree

7 files changed

+24
-10
lines changed

7 files changed

+24
-10
lines changed

high.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ image_height = 1080
33
rotate = 0
44
approximation_order = 64
55
glitch_percentage = 0.001
6-
frames = 10
7-
frame_offset = 10
6+
frames = 200
7+
frame_offset = 0
88
zoom_scale = 2.0
99
display_glitches = false
1010
auto_adjust_iterations = true
1111
remove_centre = true
12-
export = "both"
12+
export = "png"
1313

1414
glitch_tolerance = 1.4e-6
1515

@@ -18,6 +18,6 @@ probe_sampling = 15
1818
data_storage_interval = 100
1919

2020
valid_iteration_frame_multiplier = 0.10
21-
valid_iteration_probe_multiplier = 0.005
21+
valid_iteration_probe_multiplier = 0.01
2222

23-
experimental = false
23+
experimental = true

locations/hard.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
real = "-1.9997740601362903593126807559602500475710416233856384007148508574291012335984591928248364190215796259575718318799960175396106897245889581254834492701372949636783094955897931317174101259095891469501748126725148714587333938548443819033709904187344921523413310221887295870857771431011674873342592895504186325482220668710775749899926429101099841583206278295793058921625817004481783699245865364627140554117737774937789463895102748671351750212506004241754983473339789940659968568850689353099462034492524909310777724611601104714214019347435268544619054369865904944457792527241696528695821059623303046651934176389789308453627525109367436309636375268231073110318555064708363221007235298404379856922536028913291478442839193381367508575286692330907891402483843152933153748354825108021776358693600801782904774626935265722056455978643513448489091026679036353407968495795003386248005939867069799946547181378474054113117046900560609110812439442002663909295191705374444149326937073460052706389967886211172676612720028299452788285465688867116337489531157494508508315428488520037968118008255840569742557333862639124341116894229885253643651920014148109308402199399127712572209466874971603743536096235390414412927589954662603878558182262865151900604451937214289079939337905846647369517138325441736853526711818853134657265043099539402286244220638999824999819000131999789999857999958"
2+
imag = "0.0000000032900403214794350534969786759266805967852946505878410088326046927853549452991056352681196631150325234171525664335353457621247922992470898021063583060218954321140472066153878996044171428801408137278072521468882260382336298800961530905692393992277070012433445706657829475924367459793505729004118759963065667029896464160298608486277109065108339157276150465318584383757554775431988245033409975361804443001325241206485033571912765723551757793318752425925728969073157628495924710926832527350298951594826689051400340011140584507852761857568007670527511272585460136585523090533629795012272916453744029579624949223464015705500594059847850617137983380334184205468184810116554041390142120676993959768153409797953194054452153167317775439590270326683890021272963306430827680201998682699627962109145863135950941097962048870017412568065614566213639455841624790306469846132055305041523313740204187090956921716703959797752042569621665723251356946610646735381744551743865516477084313729738832141633286400726001116308041460406558452004662264165125100793429491308397667995852591271957435535504083325331161340230101590756539955554407081416407239097101967362512942992702550533040602039494984081681370518238283847808934080198642728761205332894028474812918370467949299531287492728394399650466260849557177609714181271299409118059191938687461000000000000000000000000000000000000"
3+
zoom = "7.0E405"
4+
iterations = 1000000

locations/opus.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
real = "-1.4797962709017600244252799347704115256455510544325995179098076328242862544039075945268884660999628050229751964725497716818312344916955598525839552049861977622938727694748069039955642590406675685997700941126379378570821987561050974456193507569667937931144674320329377993465740144619572026488907382726758104299281925571396606196002960095648852803940011013602573467404942350378153725402938676297434487740893628746489527148378347572616696479155070553056741269846567113187869309530709506083704618952199193376646174337372933529682317495830617582584225996626047220980000003146661160274360111758949932113090681591627736792074508141555030836148272902213632440890171948598870366036119178098168002124472931199675575978515630666649298127196398018688410935222010983880806908352014011077759074249160660588531969863434518905762067484478748868928548778376772438405496400757729996218309016311245625992087187905884917840497006166276051816501705665425555290511990241"
22
imag = "0.0011994439528134477462819732333744684445603141141325383620375692056574222167395645214711191076264533309963650679870881466636399967159398318191522486180422558246522689182996308975253866380294287064739208983585061954947980921751709470565080051258981884554765133419312569632099457685179999650016670762993336446844236778034215257672625848788694460282069039665644332180750510211229167948001409358429457822408318525728674579307646027308487673214350326307950188279884353995019301464652536433246988196260720509486592586535111295053754256454877702698366854337740431376220361692073855167521762312416027439765959720756033204080063897947492796559163545415397827454620231617310642320676741985492863616183030871530459422071478512538948407624933074421814042111671749281862544244133767582340846778717570291171721347943794724343146961916816182641403228394362447643718567728423739369698615777094087260365474691300114179641910688342217153247665225738231917222640683"
3-
zoom = "1.0E943"
3+
zoom = "0.95E943"
44
iterations = 400000
55
rotate = -10.0

palette_monochrome.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
palette = [
2+
0, 0, 0, 255, 255, 255
3+
]
4+
iteration_division = 20.0

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
./target/release/main -o high.toml locations/glitch_test_1.toml
1+
#./target/release/main -o high.toml locations/glitch_test_1.toml
22
./target/release/main -o high.toml locations/glitch_test_2.toml
33
./target/release/main -o high.toml locations/glitch_test_3.toml
44
./target/release/main -o high.toml locations/glitch_test_4.toml

src/math/series_approximation.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ impl SeriesApproximation {
135135
let imag = pos_x * delta_pixel * sin_rotate + pos_y * delta_pixel * cos_rotate + delta_top_left_mantissa.im;
136136

137137
self.add_probe(ComplexExtended::new2(
138-
cos_rotate * real - sin_rotate * imag,
139-
sin_rotate * real + cos_rotate * imag, delta_top_left_exponent));
138+
real,
139+
imag, delta_top_left_exponent));
140140
}
141141
}
142142

@@ -341,6 +341,8 @@ impl SeriesApproximation {
341341
}
342342
}
343343

344+
// println!("{:?}", self.valid_interpolation);
345+
344346
if !self.experimental {
345347
self.valid_interpolation = vec![self.min_valid_iteration; (self.probe_sampling - 1) * (self.probe_sampling - 1)];
346348
}

src/renderer.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ impl FractalRenderer {
154154
let delta_top_left = get_delta_top_left(delta_pixel, self.image_width, self.image_height, cos_rotate, sin_rotate);
155155
let delta_pixel_extended = FloatExtended::new(delta_pixel, -self.zoom.exponent);
156156

157-
self.series_approximation.delta_pixel_square = delta_pixel_extended * delta_pixel_extended;
157+
self.series_approximation.delta_pixel_square = if self.experimental {
158+
delta_pixel_extended * delta_pixel_extended
159+
} else {
160+
delta_pixel_extended * delta_pixel_extended
161+
};
158162

159163
// Used for placing the probe points
160164
self.series_approximation.check_approximation(

0 commit comments

Comments
 (0)