If Gregory was not universally appreciated at Oxford, at the court he was in great favour, probably through the influence of Bishop Burnet, who had been at college with his uncle. He was appointed mathematical preceptor to the Princess Anne’s son, the young Duke of Gloucester, and here again, if we are to believe Hearne, the choice of the court was received with universal disapprobation.

His honours, however, were only enjoyed in anticipation, for the boy died before his duties as tutor had commenced.

Gregory was now busy trying to compass some reformations in the Oxford curriculum. He drew up a new scheme for an under-graduate’s course of study, which was sent by Dr Charlett for Mr Pepys’ approval. ‘I send you enclosed a scheme of David Gregory’s not yet in any other hand, with a desire that you would, with the freedom of a man of honour and a scholar, examine, correct, alter and improve it, as may make the design most beneficial to youth (especially of the Nobility and Gentry) and redound most to the honour of the University and our Professors and the promotion of learning.’

Gregory’s plan was that the teaching should be given in English, which was certainly a sensible proposal, that the undergraduates should study some Euclid, trigonometry, algebra, mechanics, catoptrics, and dioptrics, astronomy, the theory of the planets and navigation. ‘The teacher,’ he said, ‘should be always ready to gratify the request of those who desire his instruction. If possible, the students should have a printed book on the subject; if not, the lecturer will take care timeously to give those of the class proper notes to be written by them. And lastly, if any students were found hungering and thirsting, they were to be given regular demonstrations of the operations of integers, or fractions, vulgar or decimal—when they pleased.’ As to the proper numbers for a class, Gregory said they should be not less than ten and not more than twenty. The course here touched on was described very fully in the paper sent to Mr Pepys, and Mr Pepys’ answer is rather refreshing.

‘Reverend Sir, ... As little qualified as I truly am, for offering aught upon a scheme digested with the thoughtfulness and skill of its learned author, legible in every line of it, the terms nevertheless wherein you require my opinion and advice concerning it, joined with the dignity of its subject and quality of the persons for whom it is calculated, are so forcible, that I cannot omit observing to you my missing two things.... First—Music—a science peculiarly productive of a pleasure that no state of life, public or private, secular or sacred, no difference of age or season, no temper of mind, or condition of health exempt from present anguish, nor, lastly, distinction of quality, render either improper, untimely, or unentertaining.[[3]] My other want is what possibly may be thought of less weight; but what nevertheless holds no lower a place with me on this occasion (whether for ornament, delight, solid use, or ease of carriage both at home and abroad), than any other quality a gentleman can bear about him, though none less thought on, or (which is more) of less difficulty in the attaining ... I mean Perspective: not barely as falling within the explication of vision, or serving only to the laying down of objects of sight, but with the improvement of it, to the enabling our honourable student gracefully to finish and embellish the same, with its just heightenings and shadowings, as far as expressible in black and white; thereby when in foreign travels to know how by his own skill to entertain himself in taking the appearances of all he meets with, as remarkable, whether of palaces or of other fabrics, ruins, fortifications, ports, moles, or other public views.’

[3]. Mr Pepys, who, as we know from his Diary as well as from Evelyn, was skilled in music, had thus an opportunity of expressing his views on that subject.

Mr Pepys was slightly distressed at the suggestion that English should take the place of Latin as the language in which teaching was given, not because he did not think it necessary, but he was afraid lest the honour of the university should be affected by such a change. Whether these proposals were carried into effect then is uncertain, but the Savilian professor came into closer connection with Mr Pepys during the few years that elapsed before his death, being especially upon one occasion, made the bearer of tender thanks from the university to Mr Pepys, who had commissioned Sir Godfrey Kneller to paint Dr Wallis’ portrait for the university. The drawing was done in Dr Gregory’s house, where the reverend old man was happy and at his ease, and the picture of him is pleasant. In the list of the persons to whom rings and mourning were presented on the occasion of Mr Pepys’ death and funeral, Dr Gregory, Dr Wallis and Dr Charlett, are all inserted as recipients of the most expensive rings. Others who received tokens of regard, though not such costly ones, were Sir Cloudesly Shovel, and Sir George Rooke; Mr William Penn was honoured with a 20s. ring.

In 1704 Sir Isaac Newton became President of the Royal Society, amidst general content. Prince George of Denmark was interested in astronomy, and only wanted to be shewn how he could most wisely help this science forward; and now thought Sir Isaac, if the prince gave the money, there was no reason why Flamsteed’s laborious and accurate observations of the heavens should not be published, for the help of him and all like him, who were studying what Gregory calls ‘the Celestial Physicks.’ He approached the Astronomer Royal, and after considerable difficulty, persuaded him to draw up an estimate of his observations, which was shewn to the prince. Prince George’s decision was made very rapidly, for though he was far from brilliant, (as Charles the Second wittily said, ‘I have tried Prince George sober and I have tried him drunk; and drunk or sober there is nothing in him’), he had at least one great merit, that he recognised his own limitations. Feeling that the papers before him conveyed absolutely nothing to his uninstructed mind, he appointed some members of the Royal Society to act as referees and see that the publication of Flamsteed’s Catalogue of the Constellations was carried out correctly. As referees he nominated Sir Isaac, Dr Gregory, Sir Christopher Wren, Dr Arbuthnot, and the Hon. F. Robarts. Their work proved very laborious: Flamsteed was a delicate, irritable man, and Greenwich in these old coach days was a long way from London; but the referees had made up their minds to carry the business through, and, as the dispensers of the prince’s bounty, and protectors of public interest, they drew up articles binding themselves as well as Flamsteed and the printer to perform their relative obligations. So slow and fretful however was the course of this joint effort, that neither the princely benefactor nor Gregory, whom he had appointed a referee, lived to see the work completed.

Gregory had, in 1702, dedicated his Book on the Elements of Astronomy, to the prince, drawing a comparison while he did it between Prince George of Denmark, the patron of science, and that King of Denmark who had so wisely given to the great Danish astronomer, Tycho Brahe, the wonderful observatory of Uraniborg—the city of the heavens.

The Preface of this book begins quaintly with a delicious run of mixed metaphors—‘My Design in publishing this Book, was, that the Celestial Physicks, which the most sagacious Kepler had got the scent of, but the Prince of Geometers, Sir Isaac Newton, brought to such a pitch as surprises all the World, might by my Care and Pains in illustrating them, become easier to such as are desirous of being acquainted with Philosophy and Astronomy.’ In this book there is a most curious mixture of history, imagination, ideas of Newton’s, which the philosopher had communicated to him, and observations. It was of course, as was usual at that time, written in Latin, but Edmund Stone translated it into English in 1726, and this was the book which Samuel Johnson read with so much acceptance in some of his dull days in the Island of Coll. Gregory imagined the stars as they would appear to the inhabitants of the satellites of Jupiter and Saturn, and gave to his book that inexpressible charm of individuality, so often present in the Gregories’ writings, which makes them draw portraits of themselves as they write their books. In this treatise he elucidated the principles of astronomy with all the wonderful improvements made in his day, and Newton himself considered it a masterly explanation in defence of his philosophy.