William Hunter discovered da Vinci's notes in the royal collection in the 18th century. A new exhibition at the National Museum of Scotland brings together some of these drawings together with a variety of objects and artwork from the Scottish Enlightenment. Leonardo was able to get around the problem by working with elite patrons and assisting an anatomist. Modern medicine is built on a foundation of grave robbery but had its beginnings in a more collaborative, consensual attitude. The exhibition closes with a series of videos from Edinburgh's current professor of antology, a medical student and a member of the public, each explaining the vital role of bequests by people who leave their body to medical science.

The story of Burke and Hare, two Irishmen of Edinburgh, who obtained bodies for the anatomist Robert Knox through the simple expedient of murdering them, is a gruesome one. I passed Burke's skeleton on my way to Edinburgh's medical school and was surprised to see it in the museum. The New York Academy of Medicine has a loan of Burke's signed confession. There is a painting by Zoffany of William Hunter and a painting by Troost of Dr Rell. The early 19th-century petition signed by doctors asking for bodies to be made available to them through legal means is one of the most striking exhibits.

Leonardo was in Florence in the winter of 1507-1508 where he conducted a postmortem on a man who had claimed to be more than 100 years old. Leonardo described the cause of death as a narrowing of the coronary arteries. He was in Pavia, a university city south of Milan, by the late 1510s, working with the city's professor of antology on a book. Many of Pavia's sketches derive from work he did in the winter of 1510-1511.

Leonardo was never content with a representation of death without exploring how it might be animated by the dynamism of life

Leonardo may have set this work aside because his partner in Pavia died of plague. He lived in a villa east of Milan by the end of 1511 and continued to make sketches of dogs, birds and the ways blood flows through an ox. A German mirror maker objected to human dissection and reported him to the pope in 1513.

Francois I invited Leonardo to move to France in 1516, and he settled at Amboise. In 1519, he died without completing his treatise. The story of how they came to be in Edinburgh is full of gaps. They don't know how they got to be in England in 1630 in the collection of Thomas Howard. They were gifted to the royal collection of William and Mary by 1690 and have remained there ever since.

The bones of the foot and shoulder, studies of the heart and pulmonary vessels of an ox and the veins and muscles of the arm drawn by Leonardo da Vinci.

The bones of the foot and shoulder, studies of the heart and pulmonary vessels of an ox and the veins and muscles of the arm drawn by Leonardo da Vinci, c1510-11. Photograph: Royal Collection Trust

Leonardo uses the same principles of architecture in drawing his drawings. The Flemish anatomist Vesalius was the first to overturn classical scholarship with his book On the Fabric of the Human Body. Vesalius didn't make his own drawings but his book was more concerned with form than function. Leonardo wasn't content with a representation of appearance in death without exploring how it might be animated by the dynamism of life, he scrawled notes in his usual mirror writing that probe relentlessly at the question: "But how does it work?" He knew, too, that life's mechanisms were beyond the reach of his keen eyesight: "Nature is full of countless causes that never enter experience"

In English, drawing is seen as a way to think through things. Leonardo is confused by the difference between reality he sees and what anatomists told him. The heart for him was not a muscular pump, but an organ to suffuse the blood with "noble" spirits. My university textbooks couldn't explain the structure of the mesentery, but Leonardo was able to do it. The engineering principles of weight-bearing can be seen in his oblique perspectives on the foot.

Leonardo worked against lazy expectation and his notebooksbrimmed with unprecedented insights into nature, all drawn from first principles. The exhibition shows how anatomists of the Enlightenment made up for lost time. The 500-year journey through humanity's evolving understanding of the body is exhilarating. Leonardo died before he could finish his work, but his sketches still live on, and every mark on them is a line of thought and attention. The life and work of Leonardo da Vinci was animated by a wide range of vision, intellectual curiosity, the adoption of alternative perspectives, and a fascination with illuminating the elegance of life from the wreck of death.

  • Francis is a doctor. His latest book is Recovery: The Lost Art of Convalescence, which deals with the lost art of convalescence.