Oh, I get it. the center of mass needs to be calculated after excluding the current point.
To calculate net force on A, compute the center of mass of (B, C), and compute the force b/w A and center of mass of (B, C). Ofcourse, you can't include yourself in the center of mass, because by gravity, you would be exerting an infinite force on yourself (0 distance to yourself) which would make the results meaningless.
Unfortunately, to exclude center of mass for each particle is again an O( n2 ) calculation :(
Oh, I get it. the center of mass needs to be calculated after excluding the current point.
No, that's not enough. I was already assuming we would exclude the current point when I suggested using the center of mass, which by the way can be done in linear time.
If you actually do the calculation, you'll find that using the center of mass is just an approximation: 1/x^2 + 1/y^2 is not equal to 2(2/(x+y))^2 in general.
2
u/Gear5th May 28 '19
Oh, I get it. the center of mass needs to be calculated after excluding the current point.
To calculate net force on A, compute the center of mass of (B, C), and compute the force b/w A and center of mass of (B, C). Ofcourse, you can't include yourself in the center of mass, because by gravity, you would be exerting an infinite force on yourself (0 distance to yourself) which would make the results meaningless.
Unfortunately, to exclude center of mass for each particle is again an O( n2 ) calculation :(
Cool, I learned something today :D