2
\documentclass[10pt]{article}
\usepackage[a5paper]{geometry}
\usepackage{tkz-euclide}
\usepackage{float}
\usepackage{amsthm,amssymb, amsmath, amsfonts}
\usetikzlibrary{math, arrows, positioning, shapes, fit, calc, quotes, angles}
\begin{document}
\begin{figure}[H]
        \centering
        \begin{tikzpicture}[scale=1]

        \tkzDefPoint(0,0){A}
        \tkzDefPoint(3,0){B}
        \tkzDefPoint(2,4){C}
        \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}


        \tkzDrawPolygon(A,B,C)
        \tkzDrawPoints(A,B,C,P,Q,O,K,L,M)
        \tkzDrawSegments(P,Q B,P C,Q)
        \tkzDrawCircle[circum](K,L,M)


        \tkzLabelPoints[below](A,B,O)
        \tkzLabelPoints[above](C,L)
        \tkzLabelPoints[below](Q)
        \tkzLabelPoints[left](P)
        \tkzLabelPoints[above](K)
        \tkzLabelPoints[below left](M)
        \end{tikzpicture}
    \end{figure}
    \end{document}

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!

4
  • 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

4

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

size(8cm);
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);
draw(circle(J,abs(J-M)));
draw(A--B--C--cycle);
draw(B--P--Q--C,gray);
draw(O--P^^O--Q,gray+dashed);
draw(cir,orange);
dot("$O$",align=NE,O,orange);
dot("$A$",align=NW,A,Fill(white));
dot("$B$",align=SW,B,Fill(white));
dot("$C$",align=NE,C,Fill(white));
dot("$P$",align=NE,P);
dot("$Q$",align=W,Q);
dot("$K$",align=SW+W,K,red);
dot("$M$",align=N,M,red);
dot("$L$",align=NE,L,red);

shipout(bbox(5mm,invisible));

You must log in to answer this question.

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