If you want to make nanometer-scale machines, you have to find a way to build them. And that means making all kinds of shapes. But how?

Nanomaterials are built in computer chip factories, but so far those only work for shapes that can be laid down layer-by-layer. And manipulating DNA strands gets you self-replicating molecules, but not necessarily the kinds of shapes you need to make machines. Nature builds complex geometric structures at this scale all the time, for example the protein coats on viruses are shaped like dodecahedrons (12-sided polygons).

PHOTOS: 20 Best Microphotos of 2011

So David Gracias, associate professor in of chemical and biomolecular engineering at Johns Hopkins, and Govind Menon, associate professor of applied mathematics at Brown University, decided to approach the problem by combining math and materials.

WATCH VIDEO: Nanotechnology promises to make our lives better.

First the materials. A nickel plate soldered to another nickel plate will form a hinge that folds when it is heated, because the surface tension between the solder and the nickel changes. But that only gets you something that folds. The big question was how to get complex shapes. That’s where the math comes in.

If you take a cube and unfold it you get a set of squares, called a planar net. There will be six squares, and they can be arranged in various ways. Usually people who want to make a box will have them connected in a “T” shape, but there are 10 other ways to unfold a cube.

PHOTOS: Extraordinary Beauty of the NanoArt World

But if one wants to build a more complicated shape, for instance a dodecahedron, the problem gets trickier. That’s because there are 43,480 ways to unfold one. But only a few will work in the self-replicating machine the two scientists wanted to build, because they were looking for the simplest combinations to fold the shape and maintain the best structural integrity. (When making a cube, for instance, you might want to minimize the number of edges that have to be joined rather than folded).

Menon, enlisted a couple of undergraduates — Margaret Ewing and Andrew “Drew” Kunas (also at Brown) -– to narrow down the possibilities. They built models and developed a computer program to find the optimal nets, and found six that seemed to work. They found optimal nets for icosahedrons (20 sides) octahedrons (eight) and truncated octahedrons.

They then built a net and heated it, and they got a dodecahedron that was only a few hundred micrometers on a side. This is a lot bigger than the nanoscale –- it’s about the size of a dust particle -– but it shows one way to build these kinds of shapes.