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), two constants
for the bounds of x, and two functions f(x) and g(x) for the bounds of
y. You can then change x0 to see what happens when you attach the
string at different points on the upper boundary g(x) of the object.