Grace Jones did it completely naked, Bianca Jagger once did it on a white horse and Truman Capote did in it his dressing gown and slippers.

Everyone who was anyone strutted their stuff on the dancefloor at Studio 54.

But if you preferred to sit out the Seventies disco that pounded from the speakers of the world’s most celebrated nightclub, you could borrow some opera glasses and watch the bacchanal from the dress circle of the former theatre.

And what a vista it was, as the stars of showbusiness, fashion, the arts, sport, business and politics rubbed sweaty shoulders — and often a lot more — with drag queens, muscled gym bunnies and models.

Diana Ross busts some moves on the dancefloor of Studio 54 in New York in 1979

Studio 54 existed for only 33 months, at the tail end of the Seventies, before killjoy internal revenue agents stormed its cavernous Manhattan premises, its two founders ending up in prison.

Although it continued in various incarnations, it was never the same again. But just as the flame that burns brightly burns half as long, what wild months those were.

Studio 54 is remembered as the ultimate temple to hedonism, beloved of debauchery-seekers who embraced those reckless years after birth control but before Aids.

Now a human rights activist and animal rights defender who prefers to forget those days, Bianca Jagger — she made that brief horseback trip across the dancefloor to celebrate her 32nd birthday — was a Studio 54 stalwart, along with fellow attention-junkies Andy Warhol and Liza Minnelli.

Other regulars on the celebrity guest list included Elizabeth Taylor, Michael Jackson, Mick Jagger, David Bowie, Elton John, Sylvester Stallone, John Travolta, Rod Stewart, Ryan O’Neal, Cary Grant, Jackie Onassis, Rudolf Nureyev, Salvador Dali, Farah Fawcett — and Donald Trump.

Even Paul Newman, not known for his party-going, and former First Lady Betty Ford put in appearances.

Now, nearly 40 years on from its glory days, a documentary is offering another glimpse inside the raucous establishment.

Its surviving co-founder Ian Schrager, 71, (who went on to pioneer the ‘boutique hotel’) has ended years of silence to talk candidly about the venue’s highs and lows.

Bianca Jagger - now a human rights activist and animal rights defender - makes a brief horseback trip across the dancefloor at Studio 54 to celebrate her 32nd birthday in 1977

Today, when every celebrity mis-step is seconds away from being flashed around the globe, it is difficult to imagine that a place like Studio 54 could ever exist.

Safe from the world’s gaze before the dawn of camera phones and instant social media picture sharing, the beautiful people were free to indulge themselves.

They could get as high as kites — and often were — or disappear off to the balconies and bathrooms for sex — and often did — and the photographers allowed inside knew they risked banishment if they recorded it.

Of course, some people came just to dance.

‘I like the atmosphere of Studio 54,’ gushed an afro-haired young Michael Jackson, who often went there with his actress friend Brooke Shields — she was 12 years old when she starred in the controversial 1978 film Pretty Baby — and who liked to hang around in the DJ booth.

‘It’s where you come when you want to escape. You just go wild.’

Others went simply because they knew everyone else would be there.

Studio 54, observed Keith Richards, was ‘a magnet... no matter what you were doing earlier, by midnight you found yourself at Studio 54’.

David Bowie at the infamous Studio 54 club in 1976

It worked for him, as he met his future wife Patti Hansen there.

Even if stars were soon flying in from around the world to go there, its success was never inevitable.

Schrager set up the club with Steve Rubell, a fellow middle-class Brooklyn boy keen to make it big, in a then sleazy and dangerous part of Manhattan’s West Side.

Schrager, a lawyer, exploited the building’s theatrical origins, lowering scenery on to the dancefloor and installing an elaborate lighting system so powerful that doves occasionally released at parties would get frazzled, dropping dead among the dancers.

Early pioneers in exploiting the power of celebrity culture, the pair did their utmost to ensure the stars came and their pictures were in the papers the next morning.

Rubell would later claim timing was everything in Studio 54’s astonishing success.

After the Vietnam War and the Watergate scandal, Americans were ‘tired of being serious... so everybody went out and went wild’, he said.

On the triumphant opening night in April 1977, Donald Trump and his first wife Ivana were among the first to arrive.

Singer Cher and Seventies supermodel Margaux Hemingway were on the dancefloor, mobbed by photographers.

A thousand-strong crowd clogged surrounding streets trying to get in.

Brooke Shields was lucky but Frank Sinatra wasn’t, stuck in his limo and unable even to get close to the club’s entrance.

A doctor in the crowd reportedly started handing out Quaaludes, a powerful sedative used as a recreational drug, from a giant bottle.

Witnesses said 30 drugged-out people started having ‘this mad sexual orgy... everybody was feeling everybody else’.

John Travolta (centre) and Sylvester Stallone (right) enjoy some drinks at the bar of Studio 54

From then on, the club’s problem wasn’t to attract customers, but to keep them out.

The documentary shows the puckish Rubell selecting who would be permitted inside the velvet-rope cordon outside the club entrance.

He rejected some simply because they hadn’t shaved or were wearing the wrong sort of hat.

Money, according to the co-founders, was never a criterion for getting in, although they certainly tried to keep out what they dubbed the ‘Bridge and Tunnel’ crowd — suburbanites in their gold chains and polyester shirts.

Comparing each night’s selection process to preparing a salad, Schrager and Rubell said they wanted the right mix of celebrities and exciting ‘commoners’.

Well-muscled gay men and models kept up the glamour quotient, peppered with the occasional colourful eccentric such as Rollerena, a roller-skating transvestite who by day worked as a Wall Street banker, and a 78-year-old lawyer known as ‘Disco Sally’.

Outrageous dressers were dubbed ‘flamboyances’ by the club’s doormen.

They included the Amazonian singer Grace Jones.

She ‘came in naked quite a few times’, said a former doorman, Chris Sullivan, adding waspishly: ‘Probably more than she should have. Because after a while it became boring.’

The documentary reveals that the guest list had four categories.

At the bottom were ‘NGs’ or ‘No Goods’ — people, including some stars, who should never be let in.

Elton John, Alana Hamilton and Rod Stewart (left to right) party at Studio 54 in New York

Next came those who had to pay, then those who got in free.

The last category were the NFUs or ‘No F*** Ups’ — VIPs who must be welcomed in as graciously and painlessly as possible.

Even within the Rolling Stones, there was a pecking order — while Mick Jagger and Keith Richards got in free, other band members had to pay.

Some rejected punters took desperate measures to get in, pulling guns on doormen or using climbing equipment to get into the courtyard.

One man was found dead, dressed in black-tie, after getting stuck in an air vent.

Those who got the thumbs-up found themselves in a large, plush, mirror-lined foyer — the start of what has been described as an ‘adult amusement park’.

It had an overtly camp feel, with hunky male waiters in skimpy shorts. Nudity, male and female, was ubiquitous.

But the quivering flesh and wild abandonment weren’t for everyone.

Clubbers dance at Studio 54 in 1978 under neon red lights. It was described as 'a hotbed of drugs and paedophiles'

Mr Trump, while a regular visitor, never let his hair down and appeared to come merely to be ‘seen’.

A lavish country-and-western party featuring a re-created farm was once thrown for Dolly Parton, only for the singer to be ‘freaked out’ — according to a witness — by the crowd and retreat nervously to a balcony seat.

The lavish entertainment laid on by the management, ranging from scantily clad hirelings evoking the revelry of Ancient Rome to midgets holding a dinner party with miniaturised tableware, cost as much as $200,000 (£150,000) a night in today’s money.

However, the high-end surroundings concealed low-end vices — it was famously the only New York nightclub that allowed guests to have sex on the premises.

When the club installed a moving bridge to allow clubbers to walk across the main room and avoid the jam-packed dancefloor below, it later had to be covered with rubber.

The reason, the documentary reveals, was to make it easier to wash down, as it was being used as a ‘sex pit’.

Drug-taking was also endemic — hardly surprising, really, when the one of the biggest suppliers was the co-owner.

Steve Rubell would walk around in a long padded coat, the pockets of which concealed supplies of cocaine, Quaaludes and ‘poppers’ (the inhalable party and sex drug amyl nitrate), which he doled out to favoured guests.

Poppers were freely exchanged on the dancefloor, and some took heroin in the depths of the club.

Aware of how crucial celebrities were in promoting the club, the management did its utmost to keep them coming.

There were always little gifts, such as silver packages of cocaine tucked into the ashtrays of the limos sent to pick them up.

Trusted staff would be assigned to quietly shadow the most famous guests, making sure they were never low on alcohol or stimulants, while a ‘VIP room’ in the basement — reached through a discreet door behind the bar and patrolled by bouncers with walkie-talkies — provided seclusion.

‘You’d stumble into half-hidden rooms filled with a few people who seemed to be sweating because of something they had just done, or were about to do,’ recalled Grace Jones.

The singer also said there was a top-secret room up in the gods of the old theatre — ‘a place of secrets and secretions, the in-crowd and inhalations, sucking and snorting’.

Rubell liked to recount how a countess took a shine to a bare-chested barman and asked him to handcuff her to a hot-water pipe in the basement before they had sex.

Unfortunately, the barman — probably as stoned as everyone else — forgot to unlock her and went back to his job, leaving her not a little distressed.

Schrager had some editorial control over the new documentary and it doesn’t touch on what others regard as Studio 54’s darkest side.

Party-goers queue up to enter the infamous club Studio 54 in New York in 1978

According to Anthony Haden-Guest’s book The Last Party, in a bid to ‘liven up’ the club, pupils from posh New York private schools — including girls reportedly as young as 12 — were encouraged to come in droves.

Once inside, they were free to drink, take drugs and have sex just like the ‘grown-ups’.

One 15-year-old girl was reportedly raped by a supposedly ‘grandfatherly’ man who met her at the club and took her home.

Gail Lumet, ex-wife of the film director Sidney Lumet, said she would see well-heeled girls who didn’t even look in their teens at Studio 54.

‘I think it was a hotbed of drugs and paedophiles,’ she said. ‘If I’d known what was going on, I’d have bombed the place.’

She may have had misgivings even at the time. In the magazine Vogue, her daughter, the actress Jenny Lumet, said her mother used to sprinkle her and her sister Amy with holy water before they went to the club.

In the end, Studio 54 was brought down by its owners’ greed and hubris.

Steve Rubell became so blasé about the vast sums they were making that he boasted to a magazine: ‘Profits are astronomical. Only the Mafia does better.’

It was a jaw-droppingly stupid thing to say and, in September 1978, the club was raided by a small army of IRS agents — the equivalent of Britain’s Inland Revenue.

They found cocaine and millions of dollars, some hidden in a false ceiling and behind bookcases. Investigators also found a list of ‘party favours’ detailing all the drugs purchased for VIP guests and specifying who got what.

Having been foolish enough to record their skimming off of at least $2.5 million of club takings — the equivalent of $9.5 million today — Schrager and Rubell pleaded guilty to tax evasion and possession of drugs.

They were jailed for three-and-a-half years and threw a ‘going away’ party for more than 2,000 people in Studio 54 the night before they went off to prison in 1980.

‘I hope he gets out soon,’ Warhol said of Rubell. ‘He’s a heck of a guy.’

The pair were freed in 1981, by which time disco’s heyday was over and Aids would soon devastate the gay community who had packed out Studio 54.

Just months before he died, aged 45, of an Aids-related illness in 1989, Rubell declared himself cured of his obsession with befriending stars.

‘Celebrities — I can’t stand them,’ he said. ‘I don’t like parties and I’m not impressed any more.’

Studio 54 is released in cinemas nationwide on June 15. For more details visit www.studio54doc.com