How Math Has Changed the Shape of Gerrymandering