Lesson 15 of 15
Newton's Law of Gravitation
Universal Gravitation
Every mass attracts every other mass. Newton's law of universal gravitation:
- N·m²/kg² — the gravitational constant
- — masses in kg
- — distance between centres in metres
- — attractive force in Newtons
The Inverse-Square Law
Force falls off as . Double the distance one quarter the force. This is why the Moon orbits Earth rather than flying away — gravity weakens with distance, but never reaches zero.
Relation to m/s²
At Earth's surface ( m, kg):
The familiar constant is just Newton's law applied at Earth's surface.
Examples (using kg)
| (m) | (N) |
|---|---|
| 1 | 6.6740 |
| 2 | 1.6685 |
| 10 | 0.0667 |
Your Task
Implement gravForce(m1, m2, r) returning the gravitational force in Newtons.
TCC compiler loading...
Loading...
Click "Run" to execute your code.