There is a better (and faster) way than calculating the centroid. I won't forget about this :-)