Simplify octagon math.