ker2x
Fractal Molossus
Posts: 795
|
|
« on: May 17, 2010, 09:44:38 PM » |
|
I was just a tiny test, and i love the result : http://fractals.s3.amazonaws.com/applets/buddhaline/applet/index.htmlIt's slow on purpose (believe me, it really is slow on purpose) the "different" rendering is extremy simple. instead of void plotPlots() { float x, y; // iterate through some plots for (int n=0;n<plots;n++) { // Choose a random point in same range x = random(-2.0,1.0); y = random(-1.5,1.5); if (iterate(x,y,false)) { iterate(x,y,true); exposures++; } } } i wrote : void plotPlots() { float x, y; x = random(-2.0,1.0); y = random(-1.5,1.5); // iterate through some plots for (int n=0;n<plots;n++) { y=y+0.0001; if (iterate(x,y,false)) { iterate(x,y,true); exposures++; } } } source code available on the applet page (the .pde if, it's simpleified java code, you can download the sdk and ide here : http://www.processing.org/ ) review please ?
|
|
« Last Edit: May 17, 2010, 10:08:08 PM by ker2x »
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #1 on: May 17, 2010, 09:57:47 PM » |
|
i found a nicer rendering, brownian motion instead of lines : http://fractals.s3.amazonaws.com/applets/buddhabrownmotion/applet/index.htmlvoid plotPlots() { float x, y; x = random(-2.0,1.0); y = random(-1.5,1.5); // iterate through some plots for (int n=0;n<plots;n++) { // Choose a random point in same range float xd = random(-0.001,0.001); float yd = random(-0.001,0.001); x=x+xd; y=y+yd; if (iterate(x,y,false)) { iterate(x,y,true); exposures++; } } } please tell me what you think about it ! i love it, but what about you ?
|
|
« Last Edit: May 17, 2010, 10:07:12 PM by ker2x »
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #2 on: May 17, 2010, 11:02:00 PM » |
|
i improved the "line" version : http://fractals.s3.amazonaws.com/applets/buddhalinetwo/applet/index.htmlPS: the code is not optimal, but "it works" void plotPlots() { float x, y; x = random(-2.0,1.0); y = random(-1.5,1.5); // iterate through some plots if (iterate(x,y,false)) { for (int n=0;n<plots;n++) { // Choose a random point in same range float xd = 0.000001; //random(0.000000,0.000001); //float yd = random(-0.0001,0.0001); x=x+xd; //y=y+yd; if (iterate(x,y,false)) { iterate(x,y,true); exposures++; } else { break; } } } }
|
|
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #3 on: May 18, 2010, 12:30:33 AM » |
|
another one, more focusing on the real buddhabrot rendering than the messy stuff around it http://fractals.s3.amazonaws.com/applets/buddhalinethree/applet/index.htmlThe "final" version. i'll use this kind of algorithm on my fortran version. (but much more optimised) it's amazing how it allow to quickly build high iteration mandelbrot. the algo is extremly simple : - i find (random try) a candidate point with a lot of iteration - as soon as i found one, i try some neighbour on the x axis (and stop trying as soon as i found a point that do not have enough iteration to be plotted) - i do the same with -x, y and -y - done. void plotPlots() { float x, y; x = random(-2.0,0.5); y = random(-1.3,1.3); float x2 = x; float y2 = y; float x3 = x; float y3 = y; float x4 = x; float y4 = y; float xd = 0.00001; float yd = 0.00001;
// iterate through some plots if (iterate(x,y,false)) { for (int n=0;n<plots;n++) { x=x+xd; if (iterate(x,y,false)) { iterate(x,y,true); } else { break; } } for (int n=0;n<plots;n++) { x2=x2-xd; if (iterate(x2,y2,false)) { iterate(x2,y2,true); } else { break; } }
for (int n=0;n<plots;n++) { y3=y3+yd; if (iterate(x3,y3,false)) { iterate(x3,y3,true); } else { break; } } for (int n=0;n<plots;n++) { y4=y4-yd; if (iterate(x4,y4,false)) { iterate(x4,y4,true); } else { break; } } exposures++; } }
|
|
« Last Edit: May 18, 2010, 01:06:44 AM by ker2x »
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #4 on: May 18, 2010, 08:12:13 AM » |
|
a result rendering after ~8h with 1 million maximum iteration :
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #5 on: May 18, 2010, 05:35:59 PM » |
|
Oh, very nice I did my own modification of that source which is what I used for my various Buddhabrot variations Some formulae return amazing patterns That's cool. It should be very easy for me to try this out myself I particualirly love the brownean variation The "final" you did: Is that an optimized version, that doesn't do much difference visually?
|
|
« Last Edit: May 18, 2010, 06:00:08 PM by kram1032 »
|
Logged
|
|
|
|
kram1032
|
|
« Reply #6 on: May 18, 2010, 05:53:13 PM » |
|
One question, as you played around with the code: More or less since I got this code to work for the first time, I wonder, how to change it into a buddhagram. I tried to randomize x0 and y0 as well but, depening on where I do so, that either changes nothing at all or creates an appearance of the anti-set, as the anti-set gains a lot more exposures than the extening points one.
It has to be very simple, but I didn't figure it out until now. Nearly anything else I tried, I was able to build in: Zooming, panning, colouring, altering the resolution... (Zooming, panning and colouring are cumbersome, but they do work)
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #7 on: May 18, 2010, 06:31:45 PM » |
|
I'm now trying this as a brownian motion variation: void plotPlots() { // brownian variation 2 with symmetry float x, y; x = random(-2.0,0.5); y = random(-1.3,1.3); float y01=-y; float x2 = x; float y2 = y; float y21 =-y; float x3 = x; float y3 = y; float y31 =-y; float x4 = x; float y4 = y; float y41 = -y; float xd , yd;
// iterate through some plots if (iterate(x,y,false)) { for (int n=0;n<plots;n++) { xd=random(-0.00001,0.00001); yd=random(-0.00001,0.00001); x=x+xd; y=y+yd; y01=y01+yd; x2=x2-xd; y2=y2-yd; y21=y21-yd; x3=x3+yd; y3=y3+xd; y31=y31+xd; x4=x4-yd; y4=y4-xd; y41=y41-xd; if (iterate(x,y,false)) { iterate(x,y,true); } if (iterate(x2,y2,false)) { iterate(x2,y2,true); } if (iterate(x3,y3,false)) { iterate(x3,y3,true); } if (iterate(x4,y4,false)) { iterate(x4,y4,true); } if (iterate(x,y01,false)) { iterate(x,y01,true); } if (iterate(x2,y21,false)) { iterate(x2,y21,true); } if (iterate(x3,y31,false)) { iterate(x3,y31,true);
if (iterate(x4,y41,false)) { iterate(x4,y41,true); } else { break; } } exposures++; } } EDIT: Oh and if you didn't yet do that in your Fortan variation, I'd suggest to add the very same routines once again but with -y rather than y, as the set is symmetric
|
|
« Last Edit: May 18, 2010, 07:39:00 PM by kram1032 »
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #8 on: May 18, 2010, 07:12:33 PM » |
|
my fortran version (not yet modified) is here : http://github.com/ker2x/Fortran_buddhabrot/blob/BlackAndWhite/buddhabrot.f90The optimisations coded on the fortran version are : - take advantage of the fact that the mandelbrot (power 2) is symetric. - quickly detect if a point is in the main cardioid or the 2nd order circle. - multi thread the "final" java version (which isn't really final) is "optimised" simply because it can render nice buddhabrot with high iteration much more quickly than a good old rendering. Feel free to modify my applet, of course. It's open source i always opensource stuff, but the code is ugly and not easy to maintain : It just my sandbox
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #9 on: May 18, 2010, 07:47:59 PM » |
|
Well, I didn't really modify your app. I modified the original app (already a long time ago) and now added the same changes you did to my current version. I edited the code a little bit one again (in my previous post). As it is now, the brownian has a strange (but easily explainable, I guess) behaviour: While the symmetry (which I just added) works for the center point, eg, the original x and y, the brownian splotches which are added at each exposure, aren't exactly symmetric but rather rotated around the symmetry points. # ... symmetry point -#- ... pattern (brownian) Like this: the mirror axis lies exactly in between the two #s. I hope, that explanation works
|
|
|
Logged
|
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #11 on: May 18, 2010, 11:56:25 PM » |
|
http://fractals.s3.amazonaws.com/applets/buddhalinemovie/applet/index.htmlan early work in progress that give me a headache ... i want to do "something like that". But i can't find why it sometime stay doing nothing visible for a (potentially) long time. the goal is to make a nice and smooth animation. About your previous post... i don't understand why it rotate. PS: the code is very very ugly
|
|
« Last Edit: May 18, 2010, 11:58:54 PM by ker2x »
|
Logged
|
|
|
|
kram1032
|
|
« Reply #12 on: May 19, 2010, 05:21:00 PM » |
|
well, I basically just modified what you did on your "final" line version and what you did with the brownian motion variation and merged it into one piece of code. So the code shouldn't be much more ugly than what you did - especially after the edit. Before, I did a lot of unnecessary steps^^ To the brownian motion, I also added symmetry with the y01 - y41 which are just using -y rather than y, as their counterparts do. Besides that, it's always the same thing...
|
|
|
Logged
|
|
|
|
ker2x
Fractal Molossus
Posts: 795
|
|
« Reply #13 on: May 19, 2010, 07:01:36 PM » |
|
well, I basically just modified what you did on your "final" line version and what you did with the brownian motion variation and merged it into one piece of code. So the code shouldn't be much more ugly than what you did - especially after the edit. Before, I did a lot of unnecessary steps^^ To the brownian motion, I also added symmetry with the y01 - y41 which are just using -y rather than y, as their counterparts do. Besides that, it's always the same thing... Woooooops, sorry. i meant : MY code is very ugly !! Not your ! Mea Culpa
|
|
|
Logged
|
|
|
|
kram1032
|
|
« Reply #14 on: May 19, 2010, 08:00:13 PM » |
|
I see
|
|
|
Logged
|
|
|
|
|