compute octagon