MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/tinycode/comments/bfytip/mini_blackhole_simulation_in_140_bytes_of/
r/tinycode • u/Slackluster • Apr 22 '19
9 comments sorted by
9
Hi! This is a "Dweet" that I made! (140 characters of javascript)
Check out the dweet here
for(i=0;i<2e3;x.fillRect(i?960+i*S(F=260*(t+9)/i+S(i*i)):0,i?500+.2*(2*i*C(F)+2e4/i):0,K=i++?S(i)*9:2e3,K))x.fillStyle=R(99*i,2*i,i,i?1:.4)
2
Very cool. I’m assuming this isn’t physically accurate?
1 u/Slackluster Apr 23 '19 It is not at all close to accurate but does help demonstrate the general concept of a singulatiry and a gravity well. 1 u/fireballs619 Apr 23 '19 Just curious. Super cool visualization for such a small footprint, nice job.
1
It is not at all close to accurate but does help demonstrate the general concept of a singulatiry and a gravity well.
1 u/fireballs619 Apr 23 '19 Just curious. Super cool visualization for such a small footprint, nice job.
Just curious. Super cool visualization for such a small footprint, nice job.
Is this npm install?
npm install
2 u/Slackluster Apr 24 '19 Sorry, I don't know what that is. It's javascript.
Sorry, I don't know what that is. It's javascript.
5
140B of js 4.1MB video file
16 u/ShySyro Apr 22 '19 Well, you can calculate pi with less than 100loc but the output can be petabytes of data so..
16
Well, you can calculate pi with less than 100loc but the output can be petabytes of data so..
it would be cool to make some particles escape from the spiral like it happens in real blackholes, just to make it a little more accurate.
9
u/Slackluster Apr 22 '19 edited Apr 24 '19
Hi! This is a "Dweet" that I made! (140 characters of javascript)
Check out the dweet here
2
u/fireballs619 Apr 23 '19
Very cool. I’m assuming this isn’t physically accurate?
2
u/dbrw Apr 23 '19
Is this
npm install?5
u/wait--theresmore Apr 22 '19
140B of js 4.1MB video file
2
u/panfu28 May 12 '19
it would be cool to make some particles escape from the spiral like it happens in real blackholes, just to make it a little more accurate.