Rigid Body Dynamics and the Center of Mass of a Rigid Body
We swap the sigma for an integral and hunt down the center of mass of a rigid body — basically a particle system with locked spacing — then crunch through a solid hemisphere and a shell.
Rigid body dynamics. Brace yourself — this one’s a vibe shift.
Hold on though. We just spent forever on particle systems, and now we’re pivoting to rigid bodies? Why?
Here’s the catch: a rigid body is an ideal object. It doesn’t actually exist on Earth.
Like, for real — is there a mega-ton iron ball out there that, no matter what you hit it with, never bends, never deforms, not even a smidge? Nope. Everything gives a tiiiii~~~ny bit. Everything.
So then — why particle systems first, rigid bodies second?
Because a rigid body is literally a particle system with one extra rule slapped on top: the relative positions of all the particles are fixed. Or, said another way — the distance between any two particles is always constant.
The particles can move around as a group? Sure. But the distance between them? Locked. Zero give. Not even 0.0000000000000001 of deformation is allowed.
OK. Cool.
Let’s find the center of mass of a rigid body.
Before, we had a discrete set of particles — scattered blobs — so we summed them with a sigma. Now the particles are continuous, packed in everywhere. So we toss the sigma and swap in an integral. Same idea meaning-wise — it’s still a sum — just the “continuous things” version of a sum.
Let’s write it out for $x$, $y$, $z$.
If the rigid body is a 3D object:
$$\vec{x}_{cm} \;=\; \frac{\int \vec{x_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{x_i}\,\rho\,dv}{\int \rho\,dv}$$$$\vec{y}_{cm} \;=\; \frac{\int \vec{y_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{y_i}\,\rho\,dv}{\int \rho\,dv}$$$$\vec{z}_{cm} \;=\; \frac{\int \vec{z_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{z_i}\,\rho\,dv}{\int \rho\,dv}$$And if it’s a 2D plate:
$$\vec{x}_{cm} \;=\; \frac{\int \vec{x_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{x_i}\,\sigma\,ds}{\int \rho\,ds}$$$$\vec{y}_{cm} \;=\; \frac{\int \vec{y_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{y_i}\,\sigma\,ds}{\int \rho\,ds}$$$$\vec{z}_{cm} \;=\; \frac{\int \vec{z_i}\,m_i}{\int m_i} \;=\; \frac{\int \vec{z_i}\,\sigma\,ds}{\int \sigma\,ds}$$Alright — let’s put this to work on two practice shapes: a solid hemisphere, and a hemisphere shell.

Solid hemisphere. Packed all the way through — solid.
By symmetry, $X_{cm}$ and $Y_{cm}$ are zero. Obvious? Yeah, obvious. That O point up there — the spot I marked with the x — that’s our origin. ^^
So the only real question is $Z_{cm}$.
The trick: slice the hemisphere into thiiiin~~~ discs at each height $z$. Did you slice it? (in your head, I mean.)
Now, once you’ve got all those discs — how do we combine them? Each disc gets weighted by the $z$ value where it sits. That $z$ is the “weight” in the weighted average.
So: take the mass of each oh-so-thin disc, multiply by its $z$, add them all up, divide by the total mass. Boom — $Z_{cm}$.
$$\text{density}\;:\;\rho$$$$\text{radius of the oh-so-thin disc at arbitrary height } z \;:\; \sqrt{a^2 - z^2}$$$$\text{thickness of that disc}\;:\;dz$$$$\therefore \text{volume of the oh-so-thin disc}\;:\; \pi\left(\sqrt{a^2 - z^2}\right)^2 dz$$$$\text{mass of the oh-so-thin disc}\;:\; \pi\rho\left(\sqrt{a^2 - z^2}\right)^2 dz$$$$\therefore \vec{z}_{cm} \;=\; \frac{\int \vec{z}\,\pi\rho\left(\sqrt{a^2 - z^2}\right)^2 dz}{\int \pi\rho\left(\sqrt{a^2 - z^2}\right)^2 dz}$$
Hemisphere shell? Same game. Easy.
Only change: at height $z$, instead of a disc, you’ve got a ring.
Take the mass of the ring, weight it by $z$, sum them all up, divide by the total mass of the shell. Done.
$$\text{radius of the ring at height } z \;:\; \sqrt{a^2 - z^2}$$$$\text{circumference of that ring}\;:\; 2\pi\sqrt{a^2 - z^2}$$$$\text{stack the ring by } dz \;:\; 2\pi\sqrt{a^2 - z^2}\,dz \quad (\text{i.e., volume of the oh-so-thin ring})$$$$\text{mass of that ring}\;:\; 2\pi\rho\sqrt{a^2 - z^2}\,dz$$$$\therefore \vec{z}_{cm} \;=\; \frac{\int \vec{z}\,2\pi\sqrt{a^2 - z^2}\,dz}{\int 2\pi\sqrt{a^2 - z^2}\,dz}$$Originally written in Korean on my Naver blog (2015-01). Translated to English for gdpark.blog.