Advertisement
Aslai

Mandlebrot

Sep 23rd, 2011
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <cstdio>
  2. #define D double
  3. int main(){FILE*q=fopen("a","wb");fwrite("BM6\0\0\0\0\0\0\0\0 \0\0\0ۈ\0\0",4,8,q);for(D j=0;j++<480;)for(D i=0;i++<640;){D x,y,c=x=y=0;while(x*x+y*y<4&&c++<100)y=2*x*y+j/240-1+(x=x*x-y*y+i/183-2)-x;int o=5*c*(4<x*x+y*y);fwrite(&o,3,1,q);}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement