Is there a quick and efficient algorithm for calculating the volumetric center (probably the wrong term) of a polygon like that shown in the figure below somewhere around the blue dot? I'm not referring to centroid (approximately the red dot) as the average of points in the polygon, but based on the enclosed space. There won't be holes in this, though a solution which supports holes would also be welcome.
Volumetric center of a polygon
algorithmscentroidgeometrypolygons
Related Solutions
I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.
If $r_1<r_2$ is the range you want for the radii, then you want $\theta: [r_1,r_2]\to [0,2\pi]$ so that $\theta(r_1)=0$, $\theta(r_2)=2\pi$ and the velocity of the curve $\left(r\cos\theta(r),r\sin\theta(r)\right)$ is constant in amplitude.
The velocity is $(\cos \theta(r) -r\theta'(r)\sin\theta,\sin\theta(r) + r\theta'(r)\cos\theta(r))$, and the amplitude is $$\sqrt{\left(\cos \theta(r) -r\theta'(r)\sin\theta(r)\right)^2+\left(\sin\theta(r) + r\theta'(r)\cos\theta(r)\right)^2} = \sqrt{1+\left(r\theta'(r)\right)^2}$$
So for this to be constant as $r$ changes, $\theta'(r) = \frac{A}{r}$, and thus $\theta(r)=A\log r + B$, for some constants, $A,B$.
Now solve for $A,B$ using the boundary conditions $$A\log r_1 + B = 0\\A\log r_2 + B=2\pi$$
This gives: $$B=-A\log r_1\\ A=\frac{2\pi}{\log{r_2}-\log {r_1}}$$
So, $$\theta(r)=\frac{2\pi\log\frac r{r_1}}{\log\frac{r_2}{r_1}}$$
The to get $n$ points, just define $r_1=s_0,\dots,s_{n-1}=r_2\in [r_1,r_2]$ with $s_i$ equidistant in $[r_1,r_2]$.
So $s_k=r_1+k\frac{r_2-r_1}{n-1}$ and letting $R=r_2/r_1$, we get $s_k/r_1 = 1+k\frac{R-1}{n-1}$ and therefore $$\theta(s_k)=2\pi\frac{\log\left(1+k\frac{R-1}{n-1}\right)}{\log R}=2\pi\log_R\left(1+k\frac{R-1}{n-1}\right)=2\pi\log_R\frac{s_k}{r_1}$$
The $2\pi$ could, of course, be replaced by any angle to get different "sweeps" of the angle.
If you wanted the points to be equidistant, rather than just equidistant on the curve, that's quite a bit harder.
Best Answer
Pick your favorite origin and then the center of mass $\vec{v}_{cm}$ is:
$$\vec{v}_{cm} = \frac{\sum{A_j\vec{v}_j}}{\sum{A_j}}$$
where $A_j$ is the area of the $j$th rectangle and $\vec{v}_j$ is the center of the $j$th rectangle.
This assumes uniform density throughout the rectangles.