Many people can go on and on about the “beauty of math”: everything fits, and that’s amazing. Personally, I think math is pretty handy, but not always that pretty. But hey, I suppose I proved myself wrong in this latest project.
DCIR is a program that renders pretty pictures based on a chaotic set of functions- the DeJong equations:
x' = sin(ay) - cos(bx)
y' = sin(cx) - cos(dy)
Thus, starting with a random a,b,c,d,x, and y, we recursivly solve for an X’ and Y’ pair, then plug them back in while keeping a,b,c, and d constant. As opposed to your average function, such as f(x) = sin(x), these functions put out chaotic numbers. That is, they don’t follw any specific method, they simply hop around. But it turns out, they tend to hop into some areas more often than others. If you take a look at the images below, you’ll see what I mean. The brighter an area is, the more times an iteration “hopped” into that area. (Clicking on a picture will make it bigger, visualizations performed using Winfeild by Andrei Chernousov)
You can get the source here:
single machine (dcir.c),
distributed (dcir_d.c)
While this method is great, it’s outrageously slow. Thus, the name suggests, DCIR is going to be “distributed”, or cluster-ready. At the moment the single-cpu code works great, but the MPI version leaves something to be desired… It sucks about 80 Mb/s of bandwidth, then dies. (Hey, it LOOKS like it should work )
I would like to thank the developers of Fyre. Fyre is basically a better version of what I’ve made. We discussed originally how they had things set up, particularly how their clustering worked. Their version included some nice editing tools that DCIR doesn’t, as well as a built in visualizer, and an animation option. The reason I wrote my own was more of a personal challenge than a real reason, though it will be nice to have a version that runs on MPI, as opposed to running the Fyre rendering server on all the nodes of the cluster.
For reference, here are some old images from the first version of DCIR, as well as some nice example I’ve made with Fyre (the antialiasing sure is nice):
Trial 1 at different exposures:
Trial 2:
Fyre: