\usepackage{amsthm,amssymb, amsmath, amsfonts}
\usetikzlibrary{math, arrows, positioning, shapes, fit, calc, quotes, angles}

        \tkzCircumCenter(A,B,C) \tkzGetPoint{O}
        \tkzDefPointWith[linear, K=0.6](C,A) \tkzGetPoint{P}
        \tkzDefPointWith[linear, K=0.3](B,A)\tkzGetPoint{Q}
        \tkzDefMidPoint(B,P) \tkzGetPoint{K}
        \tkzDefMidPoint(C,P) \tkzGetPoint{L}
        \tkzDefMidPoint(Q,P) \tkzGetPoint{M}

        \tkzDrawSegments(P,Q B,P C,Q)

        \tkzLabelPoints[below left](M)

The above code generates a figure for the 2nd IMO 2009 problem. The problem is that the author of the geometry exercise assumes that line PQ is tangent to the circle KLM. How can I tell tkz-euclide that I want the line PQ to be tangent to the circle? What if other problems say that we need some segments to be congruent to each other or angles? How can I write tkz-euclide such that those segments are congruent? Thanks in advance!

  • Your posted code doesn't compile because you've left out \usetkzobj{all}. When that's added, point P shows up inside the circle and Q outside the circle. That won't give us a tangent but it traces to you defining \tkzDefPointWith[linear, K=0.6](C,A) \tkzGetPoint{P} whereas K around 0.8 will give us a chance for a tangent. Is defining K=0.6 something that cannot be altered?
    – DJP
    Commented Apr 13, 2020 at 16:04
  • Anything can be altered. I just need a condition to be able to get it tangent
    – furfur
    Commented Apr 13, 2020 at 16:24
  • I found the problem online here. You've made a mistake in your code; it should be \tkzDefMidPoint(C,Q). Given the way the problem is written I think fiddling with the numbers K= until the line looks tangent is easiest. Otherwise, I think you'd have to solve by hand before drawing because in general, such a line need not be tangent and you choosing a specific P and Q seems to be asserting that it will be tangent. Maybe others know a different way?
    – DJP
    Commented Apr 13, 2020 at 16:33
  • Unrelated to the current question – I have some ideas on how to obtain what you want in this deleted question of yours. If you're interested, you might want to re-open it.
    – Bernard
    Commented Apr 17, 2020 at 17:23

1 Answer 1


Sometimes drawing can be done by going back from the conclusion of the mathematical problem.

In drawing for this geometry problem, we start with a point A on the circle (O,R), then choose P and Q such that OP=OQ; next get points B and C as intersection points of the circle with AQ and AP, respectively.

enter image description here

// http://asymptote.ualberta.ca/
// 2009 IMO Problems/Problem 2
// https://artofproblemsolving.com/wiki/index.php/2009_IMO_Problems/Problem_2

import geometry;
real R=3,t=2.2;
pair O=(0,0),P=t*dir(90),Q=t*dir(135);
pair A=R*dir(120);
path cir=circle(O,R);
pair B=intersectionpoint(A--Q+5(Q-A),cir);
pair C=intersectionpoint(A--P+5(P-A),cir);
pair K=(B+P)/2, L=(C+Q)/2, M=(P+Q)/2;
pair J=circumcenter(K,M,L);


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .