If you hang an object from a string, its center of mass will be under
the string at rest position. In this demo, you can see this principle
in action. As before, choose a density function ρ(x, y, z),
two constants for the bounds of x, two functions for the
bounds of y in terms of x, and two functions for
the bounds of z in terms of x and y. You
can then change x0 to see what happens when you
attach the string at different points on the upper boundary of the
object.