5e-324 / imagina Goto Github PK
View Code? Open in Web Editor NEWOne of the fastest Mandelbrot set renderer & explorer.
License: GNU Affero General Public License v3.0
One of the fastest Mandelbrot set renderer & explorer.
License: GNU Affero General Public License v3.0
I have changed the image size to width/height of 788 but TextureWidth was 828 on my debug session
It is occurring on: RGBA rgba = ValToRGBA(FContext.pixelManager.Data[y * TextureWidth + x]);
This caused an out of bounds read at some point in the loop
A small optimization can be done on DPEvaluation :
inside SRContext.EvaluateLA();
during the LA[j].Evaluate(temp, dz, dc);
if dc is 0 then some multiplications and additions can be ignored.
DC will be a complex at this point so it was already converted from FloatExp to double, which will result to a zero complex number. This will be 100% true on all deep zooms.
You can add a boolean on the beggining of DPEvaluation which checks dc for zero and then this boolean can be used inside SRContext.EvaluateLA() to use an overloaded function:
LA[j].Evaluate(temp, dz);
this part of the code:
if (ThreadID == ThreadCount - 1) {
LAI_.StepLength = j - PeriodBegin;
LAs[ThreadID].Append(LA_);
LAIs[ThreadID].Append(LAI_);
}
should be changed so the last thread to add those data should be the one who has PeriodBegin != 0 (this variable should be initialized to 0) and the next thread (if any) must have have PeriodBegin == 0. If the last thread has PeriodBegin !=0 then this thread should add the data.
This needs to be added so that the actual last thread that found the period should be the one to finalize the data.
This check should be added on the starter thread (thread 0) as well, so that the multithreaded code works even if you set the ThreadCount to 1.
Probably for this fix you need to add a new array, similar to Start, which stores the PeriodBegin for each thread, and to be initialized at -1, so you can do busy wait while the value is < 0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.