When it comes to wrapping gifts, nothing presents more of a challenge than a spherical object. Whether you’re giving a soccer ball to an athlete or a crystal ball to a fortune-teller (hey, I’m not judging your friend choices), finding a way to cover that curved object with flat paper is a mathematical conundrum. To solve it, some scientists have turned to an unusual source: chocolate candy.

The central problem has to do with the mathematical concept of curvature. Flat planes of paper have zero points of curvature—but each time you create a fold in that plane, you add a point. To get as much curvature as a sphere, however, you would have to make an infinite number of folds. Fun as it may be to wrap gifts (and let’s be real, it’s not really *that* fun), nobody wants to spend the rest of eternity on it.

Luckily, there’s an easy way to make lots of folds: crinkle the flat plane. Or better yet, scrap your wrapping paper and replace it with aluminum foil. “Foil is much better at crinkling,” says MIT computer scientist Erik Demaine. “You squeeze it and it makes lots of little tiny crinkles, or folds, and that’s a better approximation to infinity.”

Of course, if you don’t like aluminum foil (or you don’t care about the science of sphere-wrapping) there’s a much simpler way to prepare your gift: “Approximate the perfect sphere with some polyhedron like a cube or some other fancier shape,” Demaine says. In other words: “Putting it in a box and wrapping the box is certainly easier to do.”

If you choose the box method of gift-wrapping, you can stop reading now (quitter). But if you’re a foil fan, you’ll notice that we still have to choose a method of folding our crinkly material around the sphere. That’s where chocolate candy comes in. When Demaine and a few other researchers were brainstorming paper ideas for an upcoming conference in Austria, one of his collaborators brought up Mozartkugel.

“Mozartkugel is the first perfectly spherical chocolate,” Demaine says. “It’s concentric spheres of various yummy things like nougat, marzipan, and chocolate.” Having studied how non-crinkly paper can wrap around a sphere, the scientists decided to study how a foil wrapper fits around this round treat.

Austrian confectioner Paul Fürst invented the Mozartkugel in 1890 in Salzburg and named it after one of the city’s most famous citizens, the musician Wolfgang Amadeus Mozart. These days, several different candy makers produce their own versions of Mozartkugel, but Demaine’s team focused on the hand-made product from Fürst’s original brand, which is only available for sale in Salzburg, and the industrial product from a competitor called Mirabell.

To obtain the experimental candies, the group relied on friends to visit Salzburg and smuggle several dozen Mozartkugel back to them. Next, they carefully unwrapped each sphere, trying not to tear the paper, to see how the foil was placed.

Then they ate the chocolate, because scientists are only human.

And finally, the researchers performed a mathematical analysis of the wrap pattern. A good wrapping, they suggested in the paper they eventually presented, would use the smallest piece of foil that could wrap a sphere, with room for the edges to overlap and thus keep the chocolate intact inside. The ideal shape would also be easy to cut in large quantities from one sheet of foil, minimizing any wasted material.

“In addition to direct savings in material costs for Mozartkugel manufacturers,” the researchers wrote in a footnote on the paper, “the reduced material usage also indirectly cuts down on CO2 emissions, and therefore partially solves the global-warming problem and consequently the little-reported but equally important chocolate-melting problem.” A worthy goal.

So what were the results of this experiment? It turns out that Fürst wraps the Mozartkugel in a square, placing the center of the square on one pole of the sphere, wrapping the square’s corners around the candy so they meet at the opposite pole, and then crinkling the edges. For this method, you would need to use a square whose diagonal length is equal to the length of the sphere’s circumference.

The Mirabell method, in contrast, cuts a rectangle of foil, wraps the long side of the rectangle around the equator of the sphere, and then squeezes the top and bottom parts to cover the poles. The rectangle must be as long as the sphere’s circumference, and half a circumference high.

The researchers, however, devised their own method, which reduces the area of the wrapping by 0.1 percent. It involves placing the sphere on a foil triangle and wrapping the three corners of the triangle around to and slightly past the sphere’s opposite pole. You can see what this looks like in the figure below, where the blue petals mark the parts of the foil that actually come into direct contact with the sphere.

For your own purposes, the triangle method may be the most efficient, and the rectangle method is probably the easiest. But what’s the positively best way to wrap a sphere?

Well, it depends what you mean by best. “There are different notions of ‘best,’” Demaine says, “but my favorite definitely is: if you want to cut out a shape that wraps a sphere, and minimize the amount of cutting you do.”

Okay, what shape fits that definition? According to Demaine, “We still don’t know what that shape is. We don’t know the best way to wrap a sphere.”

So there are still scientific problems out there to be conquered. And with any luck, they will require you to eat chocolate while you solve them.