Molecules assume different shapes due to patterns of shared and unshared electrons. In these examples all electrons affecting the shape of the molecules are shared in the covalent bonds holding the atoms together to form the molecules.