A closed form expression for the elastic energy of an arbitrary small angle tilt boundary is derived and used to study grain boundary faceting in NiO. Results are in good agreement with experiment. It is found that the rules of the O-lattice model, which is also successful in explaining the boundary structure in NiO, may be justified by and derived from the present elastic energy formalism