Created
February 26, 2026 13:07
-
-
Save RYSF13/9340c61d7a25da4eb937aac060963321 to your computer and use it in GitHub Desktop.
render a blackhole in 4 lines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float R,o,b,e,r,t/*Y.Stanford*/;main(){for(o=-11;++o<10;puts(""))for( | |
| R=-31;++R<30;)b=R*.98-o*.2,e=o*.98+R*.2,t=hypot(R,2*o)-7,r=exp(-t*t)* | |
| (.65+.35*cos(atan2(2*o,R)-.2)),t=fabs(b)<15?exp(-e*e/.3)*(.65+b*.023) | |
| :0,putchar("#*+~-,. "[(int)((r=t>r?t:r)>1?7:r*7)]);}// rysf13@qq.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment