an example of a randomly generated fractal using the mandelbrot set and computing it with distributed compute labs
Our into screen
(you can use #publicart, #mayorschallenge, #fractalkompute, #qhacks to view live images from our instagram account in the link below)
We wanted to use the power of Distributed Compute Labs to increase the speed at which the mandelbrot set fractal could be processed. Furthermore, we wanted to create something that could be interactive with users, so we added instagram API functionality into the project to use images when creating the fractals.
What it does
Using the power of Distributed Compute Labs (DCL), we are able to increase the speed at which the mandelbrot set fractal is processed by delegating the tasks to users on the network. A user is able to enter a hashtag and toggle random images. If they don't select random images, the most recent images from our instagram account will be used in the generation of the fractals. If they select random images, it will randomly select the images tagged in our account for that specific hashtag. For each hashtag that is entered, we sum the ASCII characters that make up the hashtag to create a seed to generate the fractal. This makes each of the fractals different and unique. We also added a graph at the bottom of the screen using Chart.js to enable the user to see the number of computations that are being carried out per 15 seconds that updates in real-time. This means that using the power of DCL, we are able to generate rendered frames of the fractal faster depending on the platform's ability to delegate the computing power. Essentially, the faster that the platform renders the chunks of 100,000 pixels we send it, the more frames we will get, and a greater ability to zoom in on the fractal.
How I built it
Challenges I ran into
Since distributed compute labs (DCL) currently does not support webGL to render the images of the fractal that were generated by the mandelbrot set, we had to build a custom interaction between their servers to ensure that the process would be forked to different users across their server that would process chunks with a pixel density of 100,000. At first, we tried rendering the images 1 pixel by 1 pixel, but we soon found out that this is super slow. We discovered that distributed compute lab's network has a hard time switching between tasks, and excels at taking larger harder to compute tasks instead, so we gave it larger pixel densities until we decided that a chunk with an area of 100,000 was optimal.
Accomplishments that I'm proud of
Implementing a solution to compute fractals using the mandelbrot set that takes advantage of DCL's network, and working to make sure that it integrates effectively with their network by creating a custom solution that would enable us to work around the current lack of support for webGL (which would make our processing significantly faster). Furthermore, our integration with the instagram API means that as soon as our account makes an instagram post with a certain hashtag, it will be instantly visible when generating a new non-random fractal using the mandelbrot set.
What I learned
What's next for fractalKompute
We are going to work with Distributed Compute Labs to port our project LIVE onto their demo page where other people from around the world can see the power of distributed computing and our application which harnesses this power. The more users on DCL's network, the more frames that will be available and the further you will be able to zoom!