2

Any ideas about how to draw this with TikZ? I tried several things, but nothing satisfactory. What I tried was to doing in the simplest way, that is,

\begin{tikzpicture}
    \draw (point) arc (angle contitions);
\end{tikzpicture}

What I need is something like the image:

enter image description here

I tried to use this code also (from Use tikz (for example) to draw pictures in hyperbolic geometry)

    \begin{document}

\newcommand{\hgline}[2]{
\pgfmathsetmacro{\thetaone}{#1}
\pgfmathsetmacro{\thetatwo}{#2}
\pgfmathsetmacro{\theta}{(\thetaone+\thetatwo)/2}
\pgfmathsetmacro{\phi}{abs(\thetaone-\thetatwo)/2}
\pgfmathsetmacro{\close}{less(abs(\phi-90),0.0001)}
\ifdim \close pt = 1pt
    \draw[blue] (\theta+180:1) -- (\theta:1);
\else
    \pgfmathsetmacro{\R}{tan(\phi)}
    \pgfmathsetmacro{\distance}{sqrt(1+\R^2)}
    \draw[blue] (\theta:\distance) circle (\R);
\fi
}

\begin{tikzpicture}
\draw (0,0) circle (1);
\clip (0,0) circle (1);
\hgline{30}{-30}
\hgline{180}{270}
\hgline{30}{120}
\hgline{0}{180}

\end{tikzpicture}

But this allow me to draw lines embedded on the disk, and when I try to remove the circle, the code is unuseful.

Thank you.

  • A hyperbolic triangle. The first I tried was to use the most simple thing using \draw (point) arc (angle). However, I could not control the lines so I searched here: tex.stackexchange.com/questions/16617/… I tried everything they put, but their solutions were about drawing hyperbolic lines on the disk, and when I tried to remove the disk the code began to do strange things. – Rubén Fernández Fuertes Feb 18 at 16:58
  • 2
    Check out tex.stackexchange.com/q/446325/172926 – Pippip19 Feb 18 at 16:59
  • I did it, and it was too much complicated for what I need, I need just a code for drawing a simple hyperbolic triangle... – Rubén Fernández Fuertes Feb 18 at 17:00
  • 2
    @RubénFernándezFuertes We need to know what your simple hyperbolic triangle looks like. Please make your question in some formats like this: I want to draw this <picture> Here is what I have tried <code>. – JouleV Feb 18 at 17:02
  • In the simplest possible case, you only have to draw three curves joining three points. – JouleV Feb 18 at 17:03
2

Something like this?

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[font=\sffamily]
 \path (0,0) coordinate (A) (4,1) coordinate (B) (2,-2) coordinate (C);
 \draw[thick,path picture={
 \foreach \X in {A,B,C}
 {\draw[line width=0.4pt] (\X) circle (1);}}] (A) node[left]{$O$} to[bend right=12] 
 (B) node[above right]{$g_2^{-1}\cdot O$} to[bend right=15] 
 (C) node[below]{$g_1^{-1}\cdot O$} to[bend right=20] cycle;
 \node at (barycentric cs:A=1,B=1,C=1) {$<180^\circ$};
\end{tikzpicture}
\end{document}

enter image description here

EDIT: With explicitly constructed circular arcs.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[font=\sffamily]
 \path (0,0) coordinate (A) (4,1) coordinate (B) (2,-2) coordinate (C);
 \draw[thick,path picture={
 \foreach \X in {A,B,C}
 {\draw[line width=0.4pt] (\X) circle (1);}}]
 let \p1=($(B)-(A)$),\p2=($(C)-(B)$),\p3=($(C)-(A)$),
 \n1={atan2(\y1,\x1)},\n2={atan2(\y2,\x2)},\n3={atan2(\y3,\x3)},
 \n4={veclen(\y1,\x1)},\n5={veclen(\y2,\x2)},\n6={veclen(\y3,\x3)} in
 (A) node[left]{$O$}  arc(-90-15+\n1:-90+15+\n1:{\n4/(2*sin(15))})
 --(B) node[above right]{$g_2^{-1}\cdot O$} 
  arc(-90-15+\n2:-90+15+\n2:{\n5/(2*sin(15))})
 --(C) node[below]{$g_1^{-1}\cdot O$} 
 arc(90-15+\n3:90+15+\n3:{\n6/(2*sin(15))}) -- cycle;
 \node at (barycentric cs:A=1,B=1,C=1) {$<180^\circ$};
\end{tikzpicture}
\end{document}

enter image description here

  • I have a small request: How can I add the angles? – JouleV Feb 18 at 17:18
  • 1
    @JouleV Added. (With path picture it is very easy.) – marmot Feb 18 at 17:22
  • 1
    It is perfect now :) Unfortunately I have reached my 40 votes limit, so I can't vote yet. – JouleV Feb 18 at 17:28
  • @JouleV No worries! (Even if I cared, I am reputation capped today.... ;-) – marmot Feb 18 at 17:29
  • 1
    I did it but I don't know why it did not appear! Sorry, I did it again, and now it seems to be okay. Many thanks again. – Rubén Fernández Fuertes Feb 18 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.