Fix polygon to take into account the y coordinate

Previously, the x center was used for both y and x coordinate calculations
Merge pull request #10 from exrook/patch-1

[BUG] Fix polygon to take into account the y coordinate