I was thinking of center of gravity being based on area.
Let O be the object. Let G be the center of gravity of O. Let Ri be a ray from G to infinity such that the minor angle between the base ray and Ri is i. Let Rj be another such ray, such that the minor angle between Ri and Rj is j. Let Aij be the area of O between Ri and Rj. G is the point that best satisfies the following condition: (approximates (quotient (sum (n in 0 to (product 2 Pi)) ;; interval is 1 (radian) (sum (m in 0 to (product 2 Pi)) ;; interval is 1 (radian) Anm)) (product 2 Pi 2 Pi)) 0)
That's rather messy, slow and probably incorrect.
If you can code this in C/C++ using our livarot/Path.h class which describes the path of an object, I will hook it up as an option for the pivot point (maybe it's best to make this a point to which pivot snaps when you drag it, with an appropriate message in the statusbar, e.g. "pivot snapped to the object's center of gravity"). That would indeed be useful. Slowness is not a too big concern since this calculation will only fire when you start dragging the pivot, not when you select something. Also your algorithm should return not only a point but the overall weight of the path, so that centers of gravity of several selected paths can be averaged based on their relative weights.
(Yeah, I realize it's the user list, and I was recently chastised for proposing to make a patch here, but since you already wrote some code I though it would be OK in this case :)