-
-
Save yalla/c72224039a5ed1c2a265 to your computer and use it in GitHub Desktop.
Spaghettification code for M87
This file contains 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
function force=newtons_law(d, b_mass) # d[m], b[kg] | |
G=6.67384e-11; # Nm^2/kg^2, Newtonian grav. constant | |
sun_mass=1.9884e+30; # kg | |
bh_factor=6.7e+9; # M87 black hole multiplication factor | |
force=(G.*bh_factor.*sun_mass.*b_mass)./(d.*d); | |
endfunction | |
AU=149597870700; | |
x=130:10:2000; | |
plot(x, newtons_law(x*AU+2, 10)-newtons_law(x*AU, 2.5)) | |
semilogy(x, newtons_law(x*AU+2, 10)-newtons_law(x*AU, 2.5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment