- #1
YauS
- 5
- 0
Homework Statement
i want to simulate the object in space with c++
Homework Equations
i use a very small time interval to calculate the force and velocity.
i get wrong answer that the total energy in the system are increased.
And the objects are on the wrong locus.
Obj.Force = -g*m_1*m_2/(r*r);
Obj.Velocity += Obj.Force/mass *time;