/* * My version of: * https://twitter.com/KangarooPhysics/status/1299049072771371010 * https://twitter.com/jagarikin/status/1336177694388572160 * (links accessed 2021-02-27) * * See also: * http://www.josleys.com/articles/ams_article/Lorenz3.htm#orbits * https://observablehq.com/@chnn/the-modular-flow-in-tex-mathcal-l-and-tex-mathbb-h * (links accessed 2021-02-27) * * Thanks to Rakesh for some help with the maths. * * gcc -Wall hyperbole.c -lm * ./a.out|ffmpeg -f rawvideo -s 512x512 -r 30 -pix_fmt gray -i - hyperbole.gif * ffmpeg -i hyperbole.gif -vf scale=64:64 hyperbole-small.gif */ #include #include char A[1<<18];int main(void){double K=0.5257311121191334,J=0.8506508083520399, B,C,D,E,F,G,H;int I,L;for(B=0;B<60;B++){for(I=0;I<1<<18;)A[I++]=0;for(C=-2;C<2 ;C+=.2)for(D=-2;D<2;D+=.2){E=exp(-0.016040394168653451*B+0.24060591252980173); G=E*1.6180339887498949*C-E*D;H=0.618033988749894903/E*C+D/E;E=J*G-K*H;F=K*G+J* H;G=E*256+256;H=511-(F*256+256);for(I=G-32;I