Implementation of calculating the mass of a polygon.
The desired density to factor into the calculation.