HE was said to be a magician who travelled with a black spider in a small box and a black cockerel as his animal familiar.
But "Marvellous Merchiston" - real name John Napier - was actually one of Scotland's greatest scientists, and a man who has been compared to Archimedes.
The philosopher and mathematician, who lived from 1550 to 1617, is credited with inventing the logarithm - although Islamic scholars may have actually beaten him by at least three centuries - the decimal point, and a mechanical calculator. He also developed a screw and axle to drain mines and suggested using salt as a fertiliser.
A number of "secret inventions" were described by his contemporaries, including a round chariot that was an early version of a tank, giant mirrors which could burn the sails of enemy ships, a submarine and an artillery piece that could apparently destroy a whole field of soldiers.
Napier was born in Merchiston Tower in 1550, the son of the seventh laird of Merchiston who was just 16 at the time. At the age of 13, Napier went to study at St Salvator's College in St Andrews. He dropped out without graduating and went off to travel in Europe at the age of 16. There is a suggestion that he continued his studies in Paris and Holland during the turmoil caused by the dethronement of Mary Queen of Scots. His first wife Elizabeth died after a year and he remarried in 1572 to Agnes Chisholm. They had five sons and five daughters to add to one son from his first marriage.
Napier's work on logarithms is seen as essential in creating the ground work for Isaac Newton's extraordinary breakthroughs and other scientific discoveries in the fields of physics and astronomy in particular.
A paper he wrote on multiplication, called the Rabdologiae, contained a design for a machine using metal plates to multiply and divide large numbers.
This is the earliest known mechanical device that could be used to calculate the square root of large numbers and makes Napier the inventor of what would centuries later become a modern calculator.
His "secret inventions" are more obscure as most of his papers were lost at sea.
But Sir Thomas Urquhart, who has been described as "eccentric", told of a demonstration of the devastating artillery he devised against the threat of invasion by Spain.
"He gave proof upon a large plaine in Scotland to the destruction of a great many herds of cattel and flocks of sheep, whereof some were distant from other half a mile on all sides and some a whole mile," Sir Thomas wrote.
Napier wrote extensively about religion. He predicted the Apocalypse would take place between 1688 and 1700, and in a paper on the Book of Revelation he wrote that its symbols could be explained by mathematics.
Much of his writing is vehemently anti-Catholic even by the standards of the time.
However he had several close friendships with Catholics and even dedicated the Rabdologiae, which was published in the year of his death, to Alexander Seton, the Earl of Dunfermline, who was secretly Catholic.
One his most vitriolic anti-Catholic papers was published shortly after his second wife’s father was implicated in the "Spanish Blanks" plot to help a Spanish invasion and may have been a necessary expedient to put some distance between himself and the plotters.
Napier is also thought to have secretly dabbled in alchemy, divination and the occult, all highly dangerous activities at a time when witches could be burned at the stake. He died in 1617 and is buried in St Cuthbert's Churchyard in Edinburgh.
Today Merchiston Tower, where John Napier was born, lies at the centre of the campus of Napier University in Edinburgh, which was named after him when it was founded as a college in 1964.