Intermediate level
Challenge 1 – Gravity
The law of gravity Newton’s dictates as follows:
Where F is the force of gravitational attraction between two bodies, G is Newton’s constant, m1 and m2 the masses and r ² is the distance between them.
Moreover, Newton’s second law reads:
Where V is the velocity of a given particle, m is its mass and t is time.
Make a program that can calculate the position and velocity of a rocket (excluding friction) after a time t, which is released at a V (vector) speed, which loses mass at a rate dm, and its initial mass m0. Note that if the rocket goes high, the gravitational attraction is reduced.
Special Challenge: Consider the position of the moon and its gravitational attraction as well.
No trackbacks yet.