hello all, this is a program that draw bifurcation. what do you think about that; suggestion at frizzi@ghost.sm.dsi.unimi.it --------------------------cut here ---------------------------------- #include #include #include #define ITER1 500 /* definisce le iterazioni che filtrano gli attrattori */ #define ITER2 90 /* definisce il numero di attrattori per ogni fascia */ double x, r; int i, t, z, n; void grafica(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; /* initialize graphics mode */ initgraph(&gdriver, &gmode, "EGAVGA.BGI"); /* read result of initialization */ errorcode = graphresult(); if (errorcode != grOk) /* an error occurred */ { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); /* return with error code */ } } void main(void) { grafica(); r = 2.9; x = 0.4; n = 0; setfillstyle(SOLID_FILL, BLACK); bar(0, 0, 639, 479); settextstyle(2 , HORIZ_DIR, 12); outtextxy(5,5,"frizzi@ghost.sm.dsi.unimi.it"); while (r <= 4) { for (i = 1; i < ITER1; i++) { x*=r*(1-x); } n++; for (i = 1; i < ITER2; i++) { x*=r*(1-x); putpixel((500*r)-1430, (440*x)+30, (n%15)+1); n++; } r+=0.001; } for(i=0;i<3;i++) {sound(800);delay(500);nosound();} outtextxy(2,470,"press any key to exit"); while (!kbhit()); getch(); closegraph(); }