St Margaret's, Lee of the restoration, the church is one of the best preserved examples of a decorated gothic revivalist interior in London. Between 1813-1830 there had been an attempt to rebuild the medieval church, involving the architect Joseph Gwilt. This failed when it became clear that the foundations of the old church were incapable of supporting a new building. The ruins of the original building are in the medieval churchyard on the north side of Lee Terrace. The tomb of Edmond Halley (1656–1742), from 1720 England's second Astronomer Royal and the discoverer of the periodicity of Halley's Comet is in the churchyard,
N-body problem below, as well as the famous "restricted" three-body problem. Knowing three orbital positions of a planet's orbit – positions obtained by Sir Isaac Newton from astronomer John Flamsteed – Newton was able to produce an equation by straightforward analytical geometry, to predict a planet's motion; i.e., to give its orbital properties: position, orbital diameter, period and orbital velocity. Having done so, he and others soon discovered over the course of a few years, those equations of motion did not predict some orbits very well or even correctly. Newton realized it was because gravitational interactive forces amongst all the planets was