For the 3² square, you are correct; we have 6 constraints, as opposed to the magic square's 8 (or really 5 as opposed to 7, given arbitrary normalization). However, for 4², we have 24 constraints as opposed to a magic square's 10; in general, constraint count grows factorially as opposed to the magic square's linear. Of course, I'm out of my depth w.r.t. geometry here, so maybe there's another mapping I'm missing.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.