We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › very basic question /bifurcation
Page Index Toggle Pages: 1
very basic question /bifurcation (Read 286 times)
very basic question /bifurcation
May 2nd, 2008, 12:46am
 
hi everyone!

this is my very first coding experiment - so please forgive if it does not look as pro as it could Wink
----------------------
size(800,500);
background(0);

//grid
stroke(50);
line(0, height/2, width, height/2);
line(width/2, 0, width/2, height);

stroke(255);

float n=0.1;

//parameter r0 can be adjusted towards maxr. maxr can be adjusted towards r0.

float r0=1;
float maxr=4;

//bifurcaton
for (float r=r0; r<maxr; r=r+.001){
 n=r*n*(1-n);
 println(+ r + " = r =" + " n =" + n );
 point((r*width/10),((height/2)-(height/5)*n));

}
//intervals
// the even values (1,2,3,4)
for (int i=0; i<maxr+1; i++){
 println("legende" + "=  " + i);
 stroke(100);
 line((width/10)*i,height/2+10,(width/10)*i,height/2-10);
}
// the uneven values (.5 ... 3.5)
for (float i=0.5; i<maxr; i=i+1){
 println("legende" + "=  " + i);
 stroke(100);
 line((width/10)*i,height/2+2,(width/10)*i,height/2-2);
}
-------------------------

here's the question: if you set the r0 value from 1 to 3 you will see a slice of the entire bifurcation diagram. now, how can i make this slice stretch over the same window space the entire curve used to cover (this would demand more density also, right?)? this would be some sort of zoom-in effect, where more detail is revealed from a special area.

thank you for your help Smiley

markus
www.humanchaos.net
Page Index Toggle Pages: 1