Simplify and generalize calculation of hexagon corners.