jbikker

tiny_bbc

Jan 9th, 2022 (edited)
1,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include<cmath> // sqrt
  2. #include<cstdio> // fopen
  3. int i,p=0,h[]={3<<16,8<<24,0,41944064,8};FILE*f=fopen("o","wb");int
  4. main(){fwrite(h,2,9,f);for(;p<9<<17;){float x=0,T=.2,Y=p%1024/430.-
  5. 1,R=p++/327680.-1,E=3,C=1/sqrt(Y*Y+R*R+1),I,t,N,A;Y*=C,I=1|-(Y<0),R
  6. *=C;a:t=x-I,A=T-I,N=Y*t+R*A-C*E,A=N*N-t*t-A*A-E*E+1;N+=sqrt(A);if(N
  7. <0){E+=N*C,x-=N*Y,T-=N*R,t=x-I,A=T-I,N=2*(Y*t+R*A-C*E),I=-I,Y-=N*t,
  8. R-=N*A,C+=N*E;goto a;}fputc(i,f);if(R<0)N=(3-T)/R,i=Y*N,R*=.4-(((i+
  9. int(C*N))&1)+.6);i=R>1?255:R*255;}} // "TINY TRACE" edition - JB'22
Add Comment
Please, Sign In to add comment