You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been reading through the code in this repository and have a question about the physics used in the simulation. It seems like the ray deflection is simulated using Newtonian gravitation, but the force is also multiplied by the square of cross(ray_direction, ray_to_black_hole_direction) (and then divided by the square of the distance to the black hole, essentially resulting in the square of the sine of the angle between the two vectors, so it is dimensionally correct). Why do you multiply the force by sin(angle)^2? And it also seems like you use dp = F * dt, add the change in momentum to the current direction, and then normalize it. But this produces different results to adding up all the momentum changes and normalizing it at the end (see the image below, the red vector first adds up all of the grey ones and is then normalized, while the green one is normalized after each addition, the angle between the vectors is about 15°; furthermore, all of these vectors have the same length, the differences could be much greater if some of the vectors were longer than others, see the second image, the angle between those vectors is about 25°). I would think the physically correct result is the one obtained through accumulating the changes and normalizing at the end.
Thanks for any response! :D
The text was updated successfully, but these errors were encountered:
I've been reading through the code in this repository and have a question about the physics used in the simulation. It seems like the ray deflection is simulated using Newtonian gravitation, but the force is also multiplied by the square of
cross(ray_direction, ray_to_black_hole_direction)
(and then divided by the square of the distance to the black hole, essentially resulting in the square of the sine of the angle between the two vectors, so it is dimensionally correct). Why do you multiply the force bysin(angle)^2
? And it also seems like you usedp = F * dt
, add the change in momentum to the current direction, and then normalize it. But this produces different results to adding up all the momentum changes and normalizing it at the end (see the image below, the red vector first adds up all of the grey ones and is then normalized, while the green one is normalized after each addition, the angle between the vectors is about 15°; furthermore, all of these vectors have the same length, the differences could be much greater if some of the vectors were longer than others, see the second image, the angle between those vectors is about 25°). I would think the physically correct result is the one obtained through accumulating the changes and normalizing at the end.Thanks for any response! :D
The text was updated successfully, but these errors were encountered: