yalla / spaghetti.r secret
Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Spaghettification code for M87

View spaghetti.r
1 2 3 4 5 6 7 8 9 10 11 12
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
Something went wrong with that request. Please try again.