Precalculate corner positions