Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
geometry/imo2019/imo2019p2e3.mac
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
46 lines (34 sloc)
1.21 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A variant of IMO 2019, problem 2 */ | |
load("geometry.mac")$ | |
/* Declare angles for A, B, C, A₂, B₂ */ | |
declare([theta_a, theta_b, theta_c, theta_a2, theta_b2], real); | |
/* Declare ratio for P and Q */ | |
declare(r, real); | |
/* Choose C on the real axis, avoiding possible heap exhaustion. */ | |
theta_c : 0; | |
/* A, B, C, A₂, B₂ are on the unit circle. */ | |
a : %e^(%i * theta_a); | |
b : %e^(%i * theta_b); | |
c : %e^(%i * theta_c); | |
a2 : %e^(%i * theta_a2); | |
b2 : %e^(%i * theta_b2); | |
/* A₁ is the intersection of AA₂ and BC. */ | |
a1 : intersect(a, a2, b, c); | |
/* B₁ is the intersection of BB₂ and CA. */ | |
b1 : intersect(b, b2, c, a); | |
/* L is the intersection of AA₂ and BB₂. */ | |
l : intersect(a, a2, b, b2); | |
/* PQ is parallel to AB. */ | |
p : (l - a) * r + a; | |
q : (l - b) * r + b; | |
/* P₁ is the intersection of PB₁ and the circumcircle of B₁B₂C. */ | |
ob : circumcenter(b1, b2, c); | |
p1 : reflect(ob, %i * (p - b1) + ob, b1); | |
/* Q₁ is the intersection of QA₁ and the circumcircle of A₁A₂C. */ | |
oa : circumcenter(a1, a2, c); | |
q1 : reflect(oa, %i * (q - a1) + oa, a1); | |
/* Prove that A₂, B₂, P, Q, P₁, Q₁ are concyclic. */ | |
prove(concyclic(a2, b2, p, q)); | |
prove(concyclic(a2, b2, p, p1)); | |
prove(concyclic(a2, b2, p, q1)); | |
quit(); |