FARMINGDALE, N.Y.  At the aptly named Tiny Thai restaurant here, a small table, about two and a half feet square, was jammed with a teapot, two plates of curry, a bowl of soup, two cups of tea, two glasses of water, a plate with two egg rolls, a plate of salad and an iPhone.

For most people, this would have been merely an unwieldy lunch.

For Vi Hart, her mind pondered the mathematical implications. “There’s a packing puzzle here,” she said. “This is the kind of thing where if you’re accustomed to thinking about these problems, you see them in everything.”

Mathematicians over the centuries have thought long and deep about how tightly things, like piles of oranges, can be packed within a given amount of space.

“Here we’ve got even another layer,” Ms. Hart said, “where you’re allowed to overhang off the edge of your square. So now you have a new puzzle, where maybe you want the big things near the edge because you can fit more of them off the edge before they fall off.”