Shading Circle Intersection
Author: António Ribeiro

This applet was created by António Ribeiro, pontopi@gmail.com.
He is a Math Teacher at Gondomar Secondary School (Portugal)

It shows the creation of a tool to shade the intersection of two circles

B = Center(b)
E, F = Intersect(a, b)
A = Center(a)
γ = Angle(A, F, B)
D = If(γ < 180.0 °, F, E)
β = Angle(F, B, E)
C = If(γ < 180.0 °, E, F)
α = Angle(E, A, F)
lista1 = Sequence(Rotate[C, n α / 100.0, A], n, 1.0, 100.0)
lista2 = Sequence(Rotate[D, n β / 100.0, B], n, 1.0, 100.0)
lista3 = Sequence(Polygon[Element[lista1, k], Element[lista2, 100.0 - k], Element[lista2, 100.0 - k - 1.0], Element[lista1, k + 1.0]], k, 1.0, 100.0)
R = Max(Radius[a], Radius[b])
r = Min(Radius[a], Radius[b])
R2 = 0
lista4 = Sequence(Rotate[D, n * (360.0 ° - α) / 100.0, A], n, 1.0, 100.0)
lista5 = Sequence(Rotate[C, n * (360.0 ° - β) / 100.0, B], n, 1.0, 100.0)
lista6 = Sequence(Polygon[Element[lista4, k], Element[lista2, k], Element[lista2, k + 1.0], Element[lista4, k + 1.0]], k, 1.0, 99.0)
lista7 = Sequence(Polygon[Element[lista5, k], Element[lista1, k], Element[lista1, k + 1.0], Element[lista5, k + 1.0]], k, 1.0, 99.0)
G = (8.822000000000001, 3.5320000000000005)
H = (8.272, 4.236000000000001)
c = Circle(G, H)
I = (9.350000000000001, 2.2780000000000005)
J = (10.252000000000002, 2.630000000000001)
d = Circle(I, J)
lista9, lista10 = ExtCirc(c, d)
K = (7.238000000000002, -0.31799999999999967)
L = (7.282000000000001, 0.8920000000000005)
k = Circle(K, L)
M = (6.226000000000001, -2.408)
N = (8.008000000000001, -1.946)
p = Circle(M, N)
lista8 = IntCirc(k, p)

Tool: IntCirc
Input: a, b
Output: lista3

B = Center(b)
E, F = Intersect(a, b)
A = Center(a)
γ = Angle(A, F, B)
D = If(γ < 180.0 °, F, E)
β = Angle(F, B, E)
C = If(γ < 180.0 °, E, F)
α = Angle(E, A, F)
c = 1
d = 1
e = 1
f = 1
g = 1
h = 1
lista1 = Sequence(Rotate[C, n α / 100.0, A], n, 1.0, 100.0)
i = 1
lista2 = Sequence(Rotate[D, n β / 100.0, B], n, 1.0, 100.0)
j = 1
lista3 = Sequence(Polygon[Element[lista1, k], Element[lista2, 100.0 - k], Element[lista2, 100.0 - k - 1.0], Element[lista1, k + 1.0]], k, 1.0, 100.0)

Tool: ExtCirc
Input: a, b
Output: lista6, lista7

B = Center(b)
E, F = Intersect(a, b)
A = Center(a)
γ = Angle(A, F, B)
D = If(γ < 180.0 °, F, E)
β = Angle(F, B, E)
C = If(γ < 180.0 °, E, F)
α = Angle(E, A, F)
c = 1
d = 1
e = 1
f = 1
g = 1
h = 1
lista1 = Sequence(Rotate[C, n α / 100.0, A], n, 1.0, 100.0)
i = 1
lista2 = Sequence(Rotate[D, n β / 100.0, B], n, 1.0, 100.0)
j = 1
lista4 = Sequence(Rotate[D, n * (360.0 ° - α) / 100.0, A], n, 1.0, 100.0)
k = 1
lista5 = Sequence(Rotate[C, n * (360.0 ° - β) / 100.0, B], n, 1.0, 100.0)
l = 1
lista6 = Sequence(Polygon[Element[lista4, k], Element[lista2, k], Element[lista2, k + 1.0], Element[lista4, k + 1.0]], k, 1.0, 99.0)
m = 1
lista7 = Sequence(Polygon[Element[lista5, k], Element[lista1, k], Element[lista1, k + 1.0], Element[lista5, k + 1.0]], k, 1.0, 99.0)