>>11537467When you heat an object, the atoms are shaking more, causing the electrical bonds to stretch. All the atoms expand uniformly. Its not like a liquid where all the atoms are flying all over. The atoms stay in place, in the same lattice configuration, the lattice spacing just expands.
This means when you heat a solid object, the entire object expands uniformly. In your picture, the whole gets bigger.
For the whole to get smaller, the object would have to melt and change the position of atoms relative to one another.