Source

simelo-math / IMO / 2012 / imo2k12p1_sol1_img2.euk

Full commit

frame -5, -5, 15, 10

@../../lib/triangle.euk

A B C triangle
J = excircle_center(A, B, C)
M = intersection(line(B,C), perpendicular(line(B,C), J))
K = intersection(line(A,B), perpendicular(line(A,B), J))
L = intersection(line(A,C), perpendicular(line(A,C), J))
F = intersection(line(L,M), line(B,J))
G = intersection(line(K,M), line(C,J))
S = intersection(line(A,F), line(B,C))
T = intersection(line(A,G), line(B,C))

c0 = excircle(A, B, C)

c1 = circle(M, B, K)
c2 = circle(M, C, L)

H = orthocenter(J, B, C)
X = intersection(line(C,H), line(J,B))
Y = intersection(line(B,H), line(J,C))

c3 = circle(J, X, Y)
c4 = circle(M.J)

% Drawings

draw dot
  A; B; C; J; M; K; L; F; G; S; T; X; Y
end

draw black
  line(A,K) half
  line(A,L) half
  S.T
  F.J
  F.L
  G.J
  G.K
  A.S
  A.T
  "C0" K 15: 10
  "C1" J 90: 4; "C2" J -15:4
  "C3" H 45:; "C4" intersection(line(F,L), line(J,G)) 60: 4
end

draw dashed
  c0
  c3; c4
end

draw dotted
  c1; c2
end

label 
  A 180:; B -30: 2; C 90: 2; J 0:; M -135:; K -90:; L 135:; F -135:; G 180:; S 0:; T 180:; X -45:; Y 90:
end