I describe a method to calculate the moments of a polygon by only knowing the value of the vertices. The moments are then used to fit an ellipse on the polygon.