3 ms·
Yours is really cool, too! Thanks for sharing, since lately I've been doing a lot of reading/learning about black holes. But where is the hole in your demo? I s
by mholt 12y ago
Yours is really cool, too! Thanks for sharing, since lately I've been doing a lot of reading/learning about black holes. But where is the hole in your demo? I see the distortion but I also can still see stars within the event horizon, if there is any.
- cturhan 12y agoI kept radius of blackhole very small ( ~3px) because many demos do so[1][2]. If you look into the code you will see it's a faux effect. It's canvas so you can imagine performance when comparing with WebGL :) It just replaces positions of pixels according to an effective radius and some simple mirror algorithm. Also to smooth effect I used smoothstep function. [1] https://www.youtube.com/watch?v=FCoxYlpJq9s&t=1m13s https://www.youtube.com/watch?v=FCoxYlpJq9s&t=1m13s [2] http://upload.wikimedia.org/wikipedia/commons/d/d6/BlackHole_Lensing.gif http://upload.wikimedia.org/wikipedia/commons/d/d6/BlackHole... [3] http://en.wikipedia.org/wiki/Smoothstep http://en.wikipedia.org/wiki/Smoothstep