design and implement the aoe grid algorithm through distinct quadrants