This Demonstration shows four examples of interesting figures in which a quantity that depends on two others that vary stays constant as long as some geometric condition is met. The two variables are the lengths of the sides and of two squares or the diameters of two circles.[more]
The first example consists of two adjacent squares touching the corresponding sides (or their extensions) of an isosceles triangle. You can vary the value of the size corresponding to the yellow piece and the height of the triangle.
The second example shows a similar situation with semicircles.
The third example combines touching squares and a semicircle.
Finally, the fourth example treats the case of two tangent circles touching a semicircle and two semicircles of the same size. This last example lets you vary the size of these two circles and shows that, for a fixed size of the two semicircles, the sum of their areas remains constant.
In the last two examples the dependence of the constant quantity with the size of the underlying semicircle is easy to find out by playing with the controls. Can you obtain the exact expression corresponding to the constant for the first two cases, assuming the triangle has a unit base and is of height ?[less]
 L. C. Tien, "Constant-Sum Figures," The Mathematical Intelligencer, 23(2), 2001 pp. 15–16.