Logo by kr0mat1k - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 19, 2024, 10:19:38 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: a creative buddhabrot rendering  (Read 6062 times)
Description: java applet
0 Members and 1 Guest are viewing this topic.
ker2x
Fractal Molossus
**
Posts: 795


WWW
« 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.html
It's slow on purpose (believe me, it really is slow on purpose) smiley

the "different" rendering is extremy simple.

instead of
Code:
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 :
Code:
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

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« 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.html

Code:
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++) {
    // 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

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #2 on: May 17, 2010, 11:02:00 PM »

i improved the "line" version : http://fractals.s3.amazonaws.com/applets/buddhalinetwo/applet/index.html

PS: the code is not optimal, but "it works" smiley

Code:
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

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« 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.html

The "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.

Code:
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

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #4 on: May 18, 2010, 08:12:13 AM »

a result rendering after ~8h with 1 million maximum iteration :

Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« Reply #5 on: May 18, 2010, 05:35:59 PM »

Oh, very nice cheesy

I did my own modification of that source which is what I used for my various Buddhabrot variations smiley
Some formulae return amazing patterns smiley

That's cool. It should be very easy for me to try this out myself cheesy

I particualirly love the brownean variation smiley

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
Fractal Senior
******
Posts: 1863


« 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
Fractal Senior
******
Posts: 1863


« Reply #7 on: May 18, 2010, 06:31:45 PM »

I'm now trying this as a brownian motion variation:

Code:
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 smiley
« Last Edit: May 18, 2010, 07:39:00 PM by kram1032 » Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« 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.f90
The 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 smiley
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« 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. smiley

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:
Code:
              /
   -#-       #
            /

the mirror axis lies exactly in between the two #s.
I hope, that explanation works Grin with closed eyes
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #10 on: May 18, 2010, 09:50:42 PM »

Here you go smiley

With that image, it should be clearer, what I meant with rotated and symmetric and stuff.
Note, how it features the same patterns on both sides but with a different orientation...


http://kram1032.deviantart.com/art/Tribal-Symbolism-164500454
Logged
ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #11 on: May 18, 2010, 11:56:25 PM »

http://fractals.s3.amazonaws.com/applets/buddhalinemovie/applet/index.html

an 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  sad
« Last Edit: May 18, 2010, 11:58:54 PM by ker2x » Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« 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 tongue stuck out - 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


WWW
« 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 tongue stuck out - 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.  shocked
i meant : MY code is very ugly !! Not your !

Mea Culpa   flowers
Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« Reply #14 on: May 19, 2010, 08:00:13 PM »

I see  alien
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Fractus Creative Gallery Adobe Photoshop Plugins Gallery richardrosenman 0 1171 Last post May 11, 2010, 11:04:34 PM
by richardrosenman
Buddhabrot Creative Gallery Adobe Photoshop Plugins Gallery richardrosenman 7 1956 Last post March 25, 2012, 03:55:32 PM
by fengda2870
Adobe Creative Suite CS2 for free! Non-Fractal related Chit-Chat taurus 11 2501 Last post January 17, 2013, 07:12:32 PM
by taurus
Creative Ferment Images Showcase (Rate My Fractal) Pauldelbrot 0 666 Last post June 17, 2014, 06:19:33 PM
by Pauldelbrot
Rendering Buddhabrot in Processing (need help) Help & Support Iariak 2 324 Last post March 13, 2017, 07:49:02 PM
by Iariak

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.148 seconds with 24 queries. (Pretty URLs adds 0.01s, 2q)