# Volume of a straight beaker with a rounded bottom

I'm creating a simple beaker 3D object in OpenSCAD, and for practical reasons (give the object realistic dimensions, maybe tweak them to meet specific demands) it prints the volume of the top cavity. Currently the cup is essentially just one cylinder (walls + bottom) minus another cylinder (hull), so the hull volume is trivial ($\pi r_{hull}^2 h_{hull}$).

The next step will be to replace the hull cylinder with an inner and outer cylinder plus a torus which rounds off the bottom corners of the hull in a smooth quarter-circle (like it's done for the bottom now). At that point the hull volume is the volume of the two cylinders ($\pi r_{outer}^2 h_{outer} + \pi r_{inner}^2 h_{inner}$ given that $h_{inner} = r_{outer} - r_{inner}$ to fit the "quarter torus" perfectly) plus some unknown formula for the part of the torus which is not also part of the inner or outer cylinders. What is that formula?

Example rendering of a cylinder with two smaller cylinders and a torus subtracted:

Hull cross-section to be rotated around the y-axis:

Torus only:

In other words, what is the formula for the volume of this quarter-circle rotated around the (right-side) Y axis?

-
It would be more helpful to post a 2D picture of a slice through the axis of symmetry (including the cylinder section) with your dimensions labeled. I also cannot understand what the solid looks like. – Ross Millikan Mar 10 '12 at 4:13
Done and done. I hope this is clearer despite my lack of graphics-fu. – l0b0 Mar 10 '12 at 9:23
@daniel: I'll try it as soon as I get back to the project. I'm not working full time on it :) – l0b0 Mar 13 '12 at 7:54
I left the exponent 2 out of the formula $\pi r^2$--maybe it was obvious but it's in there now... – daniel Mar 16 '12 at 12:46

The picture is I think clearer now.

You are looking for the volume of the solid of rotation generated by sweeping a quarter circle around the center of the beaker. Part of the problem is easy and part of it is subtler. If we take the distance (outer radius - inner radius) to be unit, the area of the quarter circle is just $\pi/4$.

The volume is simply that area multiplied by the distance it travels, which is $2 \pi R$, and the only question is, what to use for R? Pappus' Theorem says that we calculate that distance using the geometric centroid, whose coordinates are found as in the edit below (the value is the same in both dimensions, by symmetry).

So the coordinates of the centroid of the quarter circle are $\{ \frac{4}{3\pi}, \frac{4}{3\pi} \}$.

The radius of revolution should be: R = r_inner + $4/3\pi$ (r_outer - r_inner).

So finally the formula is, using R' as r_inner and r = r_outer - r_inner:

$V = A*2 \pi R = r^2 \frac{\pi} {4}2\pi (r \frac{4}{3 \pi}+ R')$

Edit: some detail about the centroid.

We have the area A from above. For $M_x,M_y$ we have

$M_y = \int_{0}^{1} \int_{0}^{\sqrt{1-x^2}} x dydx$ = 1/3.

$M_x = \int_{0}^{1} \int_{0}^{\sqrt{1-x^2}} y dydx$ = 1/3.

$x_{centroid} = M_y/A = (1/3) /( Pi/4) = 4/3\pi$

$y_{centroid} = M_x/A = (1/3) /( Pi/4) = 4/3\pi$

-