Hover over the menu bar to pick a physics animation.

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`per year`. The initial planet distance from the sun is then computed from the equation

`r_("Planet")=[(M_s)/(omega^2)]^(1/3)`

where I've set the Gravitational constant, `G`, equal to 1 and `M_s` is the mass of the sun. The the initial velocity of the planet is `omegar_("Planet")` and its direction is perpendicular to its radius vector, `r_V`, with respect to the sun. The gravitational force on the planet is `-M_s/(r_V)^2` and is directed along `bb vec r_V` (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 initial radius, `r_V` 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.