In image processing, it is often of great importance to have small rotational dependency for distance functions. We present an optimization for distances based on neighbourhood sequences for the face-centered cubic (fcc) and body-centered cubic (bcc) grids. In the optimization, several error functions are used measuring different geometrical properties of the balls obtained when using these distances.