HALFWAY through William Shakespeare's Hamlet, shortly after the tragic hero appears to go slightly bonkers, there's a scene in which he engages Ophelia's father, the bumbling Polonius, in a bout of cloud-gazing; that is, the deliciously mellow pastime in which one tries to discern shapes and faces in the shifting cloudscape above. Working from memory, the scene goes something like this:

Hamlet: Hail, Polonius! Mark you that big fluffy thing up there?

Polonius: 'Tis a cloud, sir.

Hamlet: Bears it not a resemblance to a bald bandicoot?

Polonius: Verily, you're right, my lord.

Hamlet: But then methinks I do see hidden in its folds a rancorous old warthog.

Polonius: Indeed so, my lord, a warthog it is.

Hamlet: But hold! Is it not also the very twin of that lusty maiden, mad Ophelia?

Polonius: Er . . .

Hamlet: Odds bodkins! It even has her tusks.

All of which nubilous musing serves little purpose, except to show that cloud-gazing, as a way of passing time, has appealed to all humanity since the earliest of times; whether it be a caveman taking an afternoon off from mammoth-bashing, a mad Danish prince with a penchant for rhetorical questions, or Perkins of 3C, sitting at the back of the French class with a digit up his nose and one eye on the sky.

Richard Hamblyn's beautifully written book, The Invention of Clouds, tells the forgotten history of one of the world's greatest cloud-gazers, Luke Howard, a young Quaker chemist from London. Despite the rather grandiose nature of the title, Howard didn't actually claim to have invented clouds - ''They're mine. I made them. Also, trees'' - so much as to have solved a problem that had taxed great minds for centuries. On a December evening in 1802, he gave a lecture to 50 people in ''a dank and cavernous laboratory in London''. By the end of it, he'd succeeded where men as revered as Aristotle and Descartes had failed - naming clouds.

It was the Age of Reason, a time when scientific theatre was all the rage. The general lust for knowledge was being translated into a kind of vaudevillian entertainment. If you can imagine Paul Daniels, transported to a stage in London in the early eighteenth century, squeaking: ''My lovely assistant Miss Debbie McGee will now attempt to demonstrate the chemical properties of phosphorous, while escaping from my cupboard of doom.'' It was that kind of time.

So when 30-year-old Howard, a modest chap who pursued meteorology in his spare time, first gave his snappily-

entitled lecture, On the Modifications of Clouds, it caused a sensation. Until then, nobody in the long history of nephology - that's the study of clouds - had been able to satisfactorily explain why clouds, in Hamblyn's words: ''rose and fell like vaporous civilisations.''

Howard's idea was that clouds united, passed into one another, and dispersed in distinct and recognisable stages. He claimed there were three basic families of cloud, into which every one of the thousands of ambiguous forms could be categorised with certainty: cirrus - from the Latin for fibre: those streaky, wispy clouds which look like a pensioner's comb-over. Cumulus - Latin for pile: the cotton-wool clouds that even the most hopeless artist can draw, and which, with the simple addition of a head and four legs, double satisfyingly as sheep. Stratus - Latin for layer: the long, knobbly things that look like gently undulating washing-machine fluff.

Howard also noted four other species, formed by the interaction of the three basic types, including nimbus - the rain cloud which is towering and stern-looking. His poetic terminology was subsequently published in the most famous scientific journal in Europe, Alexander Tilloch's Philosophical Magazine. It cemented Howard's reputation and, as his fame spread, he became a cult figure for romantics such as Coleridge and Shelley. Goethe was even moved to write a poem in Howard's honour.

All of this, and a lot more besides, is covered by Hamblyn's delightful book, which, while focusing on Howard's life story, manages to convey the deep sense of wonder and dreaminess that clouds have always inspired. Howard intended his lecture to be read while gazing skywards, translating his observations to the physical world. The Invention of Clouds is of a similar ilk. This being the case, I decide to take my copy out on to the streets of Glasgow to engage the good citizens in a spot of impromptu nephology. It is late October, and it is raining. The sky is just one big, grey mulch.

I clutch the slim volume nervously under my jacket, to protect it from the elements, and stop a man who is walking by carrying an umbrella. When I explain to him what I am doing, he looks at me as if I might be one cloud short of a weather system.

''What do clouds mean to you?'' I ask hopefully. ''Rain,'' he says, with impeccable logic. ''Can you name any of the clouds up there?'' He glances up and gets drizzle in his eye. ''I can only see one big one up there. It's a rain cloud.''

''Do you ever lie on your back and gaze at the clouds?'' I ask, hopefully.

''Not when it's raining,'' he says. This is not going quite as I had planned.

Despite the miserable conditions, others are slightly more forthcoming, with many of them stopping to stare companionably at the shifting vapours above. However, a surprising number can't tell me what clouds are, or where they come from. There's the odd know-ledgeable soul who mutters something along the lines of: ''Ahh, a classic example of biggus nimbus,'' but most don't seem to have been listening much in geography classes. Perhaps they were too busy staring out of the window - Aristophanes called clouds ''the patron goddesses of the layabout''.

Winter in Scotland is admittedly not the best time for cloud-gazing. But come the summer months, when you can lie lazily with your loved one amid the cowslips, whiling away a Sunday afternoon in contemplation of the heavens, it may be useful to have the kind of knowledge Howard brought to the world.

If, as you bill and coo at each other, you can explain to your lover that clouds are essentially water vapour which,

having risen higher and so become cooler, has condensed into droplets of water, you may find them looking at you with a newfound admiration.

If you can add confidently, in your best David Attenborough manner, that these tiny droplets cling to particles of solid matter, like sea-salt or pollen grains, and that the type of cloud they form depends on the altitude, air temperature and the shaping powers of upward radiation - well, who knows what new vistas of spiritual fulfilment might open up in your relationship.

As you crane your necks backwards, though, a warning: if you're going to impress your lover with your nephological knowledge, make sure that you're in full command of the facts.

It's particularly embarrassing, as I found to my cost, to whisper suavely in your amour's ear: ''Now that, my dear, is a perfectly formed cumulus,'' only to round a corner and find that the

perfectly-formed cumulus is drifting from the perfectly-formed chimneys of a nearby brewery.

Cloud-gazing, I'm afraid, isn't quite as simple as it seems.

The Invention Of Clouds, by Richard Hamblyn, is published by Picador, priced (pounds) 16.99.