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