0

I am trying to draw triangles/quadrilaterals in hyperbolic geometry, specifically in the Poincaré disk model. I found a code that seems simple to use but it's causing an error.

The code I found is as follows:

\documentclass{article}
\usepackage{tkz-euclide}

\begin{document} \begin{tikzpicture}[scale=3] \tkzDefPoint(0,0){O} \tkzDefPoint(1,0){A} \tkzDrawCircle(O,A) \tkzDefPoint(0.3,-0.25){z1} \tkzDefPoint(-0.5,-0.5){z2} \tkzClipCircle(O,A) \tkzDrawCircleorthogonal through=z1 and z2 \tkzDrawPointscolor=black,fill=red,size=12 \tkzLabelPoints(z1,z2) \end{tikzpicture} \end{document}

However, when I try to compile this code on Overleaf, I get the following error:

Package pgfkeys Error: I do not know the key '/tikz/orthogonal through', to which you passed 'z1 and z2', and I am going to ignore it. Perhaps you misspelled it.

I have checked the manual for tkz-euclide but I can't seem to find the particular use of argument orthogonal through... paired with the \tkzDrawCircle function.

Can someone help me fix this code?

  • 1
    It seems that orthogonal through only exists for \tkzDefCircle. So, you could do something like \tkzDefCircle[orthogonal through=z1 and z2](O,A) \tkzGetPoints{G}{g} \tkzDrawCircle(G,g). I am unsure why the linked answer worked. – Jasper Habicht Mar 19 '24 at 13:45
  • @JasperHabicht Thank you so much for your prompt response! Your solution works! – Rowing0914 Mar 19 '24 at 13:49

1 Answers1

1

I can't check whether the linked answer has worked at some point in time, but with a recent version of tkz-euclide, orthogonal trough obviously doesn't work with \tkzDrawCircle, but it works with \tkzDefCircle.

You can draw the circle via adding \tkzGetPoints{G}{g} \tkzDrawCircle(G,g) to the code:

\documentclass{article}
\usepackage{tkz-euclide}

\begin{document} \begin{tikzpicture}[scale=3] \tkzDefPoint(0,0){O} \tkzDefPoint(1,0){A} \tkzDrawCircle(O,A) \tkzDefPoint(0.3,-0.25){z1} \tkzDefPoint(-0.5,-0.5){z2} \tkzClipCircle(O,A) \tkzDefCircleorthogonal through=z1 and z2 \tkzGetPoints{G}{g} \tkzDrawCircle(G,g) \tkzDrawPointscolor=black, fill=red, size=5 \tkzLabelPoints(z1,z2) \end{tikzpicture} \end{document}

enter image description here