Move the weights around by clicking and dragging, use the sliders to change their quantity and mass. Use the "Dimensions" slider to swap between 1D and 2D. The black-and white circle is the center. If you put that point on your finger, the whole system of mass would balance on it.
My AP Physics teacher challenged me to code a Jenga game where the center of mass is automatically calculated as the pieces are moved around. Reward: extra credit. I figured this was a good first step. Center of mass formula, where m is mass, x is x position, and Xcm is the center of mass position: m1x1 + m2x2... Xcm= --------------------- m1+m2... For 2D and 3D computation, add in two more formulas for Y and Z dimensions. The ... means it can be extended to account to however many objects you need in your system of mass. The equation I used goes up to x5 and m5, since there are a maximum of five weights.