As Victor mentioned, "sci.math" would be a good place to ask.
Also look-up "center of mass" in a calculus textbook.
Also try asking general programming and algorithm questions in
the "comp.programming" newsgroup.
Also try running the following search on www.google.com :
"center of mass" algorithm
Once you have an algorithm, and have implimented it in C++, if you
have problems with it, come back here and paste your code and ask
your C++ language questions here. :-)
Tustin, CA, USA
lonewolfintj at pacbell dot net
(put "[usenet]" in subject to bypass spam filter)