#include //printf/getch itp. #include //kbhit() #include //funkcje graficzne BGI #include //Sleep(xx) #include #include #include int main() { int GraphDriver = DETECT; int GraphMode; int ErrorCode; initgraph(&GraphDriver, &GraphMode,""); ErrorCode = graphresult(); if(ErrorCode != grOk) { printf("Blad trybu graficznego: %s\n", grapherrormsg(ErrorCode) ); exit(1); } //Tutaj kod związany z rysowaniem //****************************************************************************************************************** double x, y, i, lel, k; srand(time(NULL)); x = rand()%100+250; y = rand()%100+150; for(i = 0 ; i<=130000 ; i++) { lel = rand()%10; if(lel<=5) { x = -0.4*x-1; y = -0.4*y+0.1; } else { x = 0.76*x-0.4*y; y = 0.4*x+0.76*y; } if(i>100) { putpixel(x*400+450, y*400+240, k); } printf("%lf\t\t%lf", x, y); k+=50000; } //****************************************************************************************************************** //koniec rysowania //program czeka na naciœniêcie klawisza i ZAMYKA tryb graficzny! fflush(stdin); getch(); //tylko zatrzymanie programu, żeby nie zamykał natychmiast okna graficznego closegraph(); //koniec trybu graficznego return(0); }