\vec{r}^A_{CM}=\frac{\sum_i m_i\vec{r}^A_i}{\sum_i m_i}