But how will it hang on me?

Next time you are trapped inside a neon-lit changing room trying on a possible clothes purchase, you might think of calling a mathematician, rather than a sales assistant, to help work out why those trousers aren't hanging just right. Researchers from Harvard University and the University of Santiago in Chile have begun to solve the equations governing the way in which fabric drapes, and hope that their work will help make shopping a little easier in the future.

We have an innate appreciation for the way fabric moves and falls. We can tell when an artist has accurately depicted the way clothes respond to the shape and motion of the wearer, or when some computer animations fall short with rubbery, unrealistic outfits. But science has had a hard time describing exactly how a piece of fabric will drape over an object - because of the complicated and changing patterns of folds arising from the competing gravitational and bending forces.

Rather than using large-scale computation to solve the problem, L. Mahadevan and his colleagues focused on the elements of draping - the flat sheets, cylinders and cones - that make up the folded surface. "These elements of draping are clearly illustrated by considering three distinct but related examples: the suspension of a heavy elastic sheet from a point, along a straight line, or along a curved line," the researchers wrote in their recent paper, published in the US journal, the Proceedings of the National Academy of Sciences.

When a circular sheet was hung from a point in its centre, the researchers were able to describe exactly when and how it would switch from bending in half cylindrically to falling into a cone with one or two folds. At the heart of their mathematical equations was the gravity length , which is the length scale where the balance between the bending and gravitational energies becomes important. The gravity length of a fabric is

whereis the thickness of the fabric,is its density,is the gravitational constant, andis its bending stiffness, which takes into account both its stiffness and the way in which stretching it in one dimension affects how it changes shape in the other two dimensions (think of a rubber band thinning in cross-section as you stretch it). In a rubber sheet,, while for a sheet of wrapping paper, which is thinner and stiffer,

Using scaling arguments, they were also able to predict the shape, including the number of folds, for other situations, where the sheet in question was much larger than the material's gravity length, or was instead covering a circular table, or suspended from a curtain rail.

The researchers hope that they will eventually be able to reconstruct more complicated draping surfaces by piecing these simpler structures together. "We have to 'stitch' the resulting cones, cylinders and flat sheets together much as a couturier does," they wrote.

But which ones are the perfect fit?

Although fashion designers might not use these results themselves - "they tend not to be interested in mathematical equations of any shape or form," says Jennifer Bougourd, a researcher from the London College of Fashion - the growing field of virtual shopping might.

You can already use a virtual changing room in Selfridges in London to find your perfect pair of jeans. A 3D scanner creates a model of your body, and then software wraps pattern pieces from designer jeans around the virtual you - if the jeans don't fit, the virtual jeans will either stand away from the model or not wrap all the way around. Bourgard says that the computer representation of the hang of the denim is very good, but that "the main interest is getting the fabric representation and drape working for every type of fabric".

Plus looks forward to the day we can try on any outfit in a store at the touch of a button, without even having to remove our shoes!