The lune of Hippocrates
Can a region bounded by circular arcs have exactly the area of a triangle? Hippocrates of Chios found one in the 5th century BC, the first curved figure whose area was found exactly. Over an isosceles right triangle, the semicircle on the hypotenuse reaches beyond the quarter circle about the right angle, and the crescent between them, the lune, has the triangle’s area. Ibn al-Haytham, Alhazen, extended it to every right triangle: the two lunes over its legs, outside its circumcircle, together have the triangle’s area.
In planex2d, a lune is one Boolean difference of two exact circles, and its area is the area of a face.

[1]:
import math
import planex as px
Hippocrates’ lune
The triangle has legs of 1 along the axes. The quarter circle about the right angle has the radius 1, and the semicircle on the hypotenuse is centered at its middle with the radius \(\sqrt{2}/2\). The circle of the semicircle runs through the right angle’s corner too, so its half toward the corner lies inside the quarter circle, and the difference of the two discs is the lune (Figure 1):
[3]:
quarter = px.Circle((0, 0), 1).Face()
semicircle = px.Circle((0.5, 0.5), math.sqrt(2) / 2).Face()
lune = semicircle - quarter
triangle = px.QuickSketch().Line(1).Line((0, 1)).Close().Face()
print("lune", lune.mass, "| triangle", triangle.mass)
lune 0.5000000000000002 | triangle 0.5
The proof needs no integral. The semicircle on the hypotenuse has the area \(\tfrac{1}{2}\pi(\sqrt{2}/2)^2 = \pi/4\), the same as the quarter circle. Both contain the circular segment between the hypotenuse and the quarter circle’s arc, so what is left of each has the same area: the lune of one, the triangle of the other.
The lunes of Alhazen
Over a right triangle with the legs \(a\) and \(b\), each leg carries a semicircle outward, and the circumcircle runs through all three corners with the hypotenuse as its diameter. The two lunes are the leg discs less the circumcircle’s disc. The example is the triangle with the legs 4 and 3 (Figure 2):
[5]:
def lunes(a, b):
corner_a, corner_b = (a, 0), (0, b)
legs = [px.Circle((a / 2, 0), a / 2).Face(), px.Circle((0, b / 2), b / 2).Face()]
circumcircle = px.Circle((a / 2, b / 2), math.hypot(a, b) / 2).Face()
return [leg - circumcircle for leg in legs], px.QuickSketch().Line(corner_a).Line(corner_b).Close().Face()
(first, second), right_triangle = lunes(4, 3)
print("lunes", first.mass, "+", second.mass, "=", first.mass + second.mass, "| triangle", right_triangle.mass)
lunes 3.4875901946695103 + 2.51240980533049 = 6.0 | triangle 6.0
The sum does not depend on the shape of the triangle. For right triangles from nearly flat to isosceles, the two lunes together have the triangle’s area \(ab/2\):
[7]:
for a, b in ((1, 7), (2, 5), (3, 4), (5, 5)):
(first, second), right_triangle = lunes(a, b)
print("legs", a, b, "| lunes", first.mass + second.mass, "| ab/2", a * b / 2)
legs 1 7 | lunes 3.4999999999999956 | ab/2 3.5
legs 2 5 | lunes 5.0 | ab/2 5.0
legs 3 4 | lunes 6.0 | ab/2 6.0
legs 5 5 | lunes 12.499999999999996 | ab/2 12.5