2

I am using tkz-euclide to draw a circle and then intersect a given line with it. In general, this could be done with

\tkzInterLC(A,P)(M,A) \tkzGetSecondPoint{Q}

But my circle is defined as the circumscribed circle of a triangle:

\tkzDrawCircle[circum](A,B,C)

I understand from the documentation that one cannot use a circumscribed circle as parameter for \tkzInterLC but could you at least determine the centre M (without geometrically reconstructing the whole circle)?

Or is there another (better) way to intersect a line and a circumscribed circle?

  • 2
    Hi, you have already asked several questions, so you probably already know that it helps those who want to help you if you provide the code of a complete document. Thanks. – gernot Mar 04 '17 at 12:54
  • @gernot Actually, I would have added a document if I knew what to put in there. My question is "How to find the intersection of a line and a circumscribed circle in tkz-euclide?". Should I produce a document with a tikzpicture and a %here, I need the intersection? I honestly don't know what you expect. – J Fabian Meier Mar 04 '17 at 14:20
  • To determine the center of the circle ABC you can use \tkzCircumCenter(A,B,C) and \tkzGetPoint{Center} or \tkzDefBarycentricPoint(A=1,B=1,C=1) and \tkzGetPoint{Center}. – Bobyandbob Mar 04 '17 at 14:22
  • @Bobyandbob This is exactly what I needed (if you add an answer, I upvote and accept it), thank you! – J Fabian Meier Mar 04 '17 at 14:24
  • Correction: The second solution works only for triangles.@Torbjørn T. you are right. – Bobyandbob Mar 04 '17 at 14:51
  • Regarding @gernot's comment, I think he expected just that. While it might have been possible to answer without any further ado (as Bobyandbob did), if you're not entirely sure, it's nice to be able to test what you think might be the solution, and for that you need to write the complete, working code. While it doesn't take very long (in this case), it's tedious, and it would certainly be a lot faster to copy-paste a ready-made diagram with the triangle, circle and line already in place. – Torbjørn T. Mar 04 '17 at 14:55

2 Answers2

3

With \usepackage{tkz-euclide} you can use \tkzCircumCenter(A,B,C) and \tkzGetPoint{Center}.

See: chapter 7.4.1 on page 32 (manual: http://mirror.physik-pool.tu-berlin.de/tex-archive/macros/latex/contrib/tkz/tkz-euclide/doc/tkz-euclide-screen.pdf)

enter image description here

MWE:

\documentclass[11pt,border=0cm]{standalone}

\usepackage{tkz-euclide}
\begin{document}


\begin{tikzpicture}

\tkzDefPoint(1,1){A}
\tkzDefPoint(2,1){B}
\tkzDefPoint(1,2){C}

\tkzDrawCircle[circum](A,B,C)

\tkzCircumCenter(A,B,C)
\tkzGetPoint{Center}
\tkzDrawPoints(Center)
\tkzLabelPoints[above](Center)

\end{tikzpicture}

\end{document}
Bobyandbob
  • 4,899
3

Another option is to use \tkzDefCircle first, which gives you access to the center coordinate directly (and radius, if you need that, use \tkzGetLength to save it), and then \tkzDrawCircle afterwards.

Seems tkz-euclide still has issues with the bounding box (cf. e.g. https://tex.stackexchange.com/a/130209/586), so I added a workaround for that, albeit an unpractical one.

\documentclass[border=0mm]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}

\begin{tikzpicture}
% unpractical fix for bounding box issues
\useasboundingbox (-0.2,-1.2) rectangle (2.1,1.4);

\tkzDefPoint(0,0){A}
\tkzDefPoint(2,0){B}
\tkzDefPoint(0.5,1){C}
\tkzDefPoint(0,-1){D}
\tkzDefPoint(1,1){E}

\tkzDrawPolygon(A,B,C)
\tkzDrawLine(D,E)

\tkzDefCircle[circum](A,B,C)
\tkzGetPoint{M}
\tkzDrawCircle(M,A)

\tkzInterLC(D,E)(M,A)
\tkzGetPoints{H}{I}

\tkzDrawPoints(H,I)

\end{tikzpicture}
\end{document}

enter image description here

Torbjørn T.
  • 206,688