This is an animation of the orbit change due to an asteroid impact. For simplicity, I have chosen the initial orbit to be
circular and the sun to be at the origin of coordinates
(If you're worried about fancier orbits open 'Kepler Orbits' and review that code). To make the orbit circular, I simply choose the length of
the year (in seconds) and then the angular rate, omega, of the planet is 2*pi/year. The initial distance from the sun is then
computed from the equation rPlanet=[Ms/(omega*omega)]^(1/3) where I've set the Gravitational constant, G, equal to 1 and
Ms is the mass of the sun.
The the initial velocity of the planet is omega*rPlanet and its direction is perpendicular to its radius vector, rV, with respect
to the sun. The gravitational force on the planet is -Ms/rV^2 and is directed along rV (i.e. toward the sun).
Under normal conditions, the planet position is iterated using the velocity and its changes due to the force.
When, the asteroid collides with the planet, the new velocity is computed using standard momentum and energy hard dics
conservation equations. After the collision, the course of the planet is again iterated using the gravitational
force equations.
In order to see significant orbit changes due to the collision, I have chosen to make the mass ratios of planet/sun and
asteroid/planet much larger than usually are found in nature.
The masses are adjustable by sliders. The length of a year (planet orbit time) is also adjustable.
Other adjustments are the radius of the planet orbit and the asteroid speed and the asteroid initial distance from its colliison point.
There are two distinct directions of the collision with the planet: Either parallel (tangential) to the planet path or
perpendicular (radial) to its path. Of the tangential directions one can select either parallel or antiparallel (Negate Distance)
where the latter greatly reduces the kinetic energy of the planet and therefore its orbit diameter.
For the perpendicular case one can select impact from inside the orbit or outside the orbit. These both displace the center of the
orbit without having much effect on the orbit size.
This animation does not consider the effect of gravity on the asteroid. Instead it assumes that the asteroid arrives from
outer space at very high speed so its fractional change in speed due to gravity would be small.
As always, the learner is welcome to hit the F12 button in Windows to view the Javascript code used.
speed
distance
oRad
Ma
Mp
year
Radial Intercept
Tangential Intercept