The shape of an ionic crystal depends on