Deriving an Expression for the Coordinates of a Partial Hollow Torus as a Function of the Angle I'm modeling a shape that is best described as a partial, hollow torus. Here's what it looks like: http://i.imgur.com/3h4H5KQ.png
In my application, the angle can vary from 0 to 85 degrees. I'm writing a program that iterates through this shape and requires the x and y coordinates of the center of gravity for any angle. I don't know where to start deriving this expression. I've tried using this page as a guide: How to find the center of mass of half a torus? 
The results I got from that page didn't seem reasonable. The hollow, non-symmetrical aspects of my shape make it distinct from the previous question. Where should I start with this? 
(If it's still not clear what I'm helping, this is what I'm after: http://i.imgur.com/XInCTEj.png)
 A: Let $R$ be the distance from the center of the torus to the center of a circular section, $r_1$ and $r_2$ be the inner and outer radii of each circular section (according to your picture that should correspond to $r_2=D_t/2$, $r_1=D_t/2-t$ and $R=(3/4)D_t$).
If you consider a thin slice of your torus, corresponding to a small angle $\Delta\theta$, then you can find the distance of its center of mass from the torus axis by summing over thin strips, corresponding to an angle $\phi$ around the center of the circular section, and over $r$ running from $r_1$ to $r_2$:
$$
r_{slice}=
{\int_{r_1}^{r_2}\int_0^{2\pi}(R-r\cos\phi)^2\Delta\theta\,r\,d\phi\,dr
\over
\int_{r_1}^{r_2}\int_0^{2\pi}(R-r\cos\phi)\Delta\theta\,r\,d\phi\,dr}
=R+{r_1^2+r_2^2\over4R}.
$$
The center of mass of the torus lies along the bisector of angle $\theta$. We can get its distance from the torus axis by averaging the projection of $r_{slice}$ on the bisector:
$$
r_{torus}={1\over\theta}\int_{-\theta/2}^{\theta/2}r_{slice}\cos\alpha\,d\alpha=
\left(R+{r_1^2+r_2^2\over4R}\right){2\over\theta}\sin{\theta\over2}.
$$
In the above formula, of course, $\theta$ must be expressed in radians.

