1

For a project, I wanted to draw a certain region in hyperbolic space. The boundary of that region consists of line segments and arcs of circles. I can call the draw function for line segments or arcs:

  • \draw (a,b) -- (c,d);
  • \draw (a,b) arc (theta1:theta2:r);

I find the endpoints as accurately as possible (that's fine).

The arc function is defined where

  • (a,b) is the starting point
  • theta1 is the staring angle
  • theta2 is the ending angle

The angle conventions of TiKZ are so confusing, after much trial and error, I realized that my radius is always 1, and the two points are ( ± 1/2, √3/2 ) I have available to me, the starting point (a,b) the ending point (c,d) and the radius of the circle.

Mainly I need the gray shaded region (A), it's inversion under the unit circle (B), and the union (A+B), it looks sort of like a pencil.

The obvious part (now) is that my lines need to be push inwards by 0.5, then I have to set with a pencil and find what angle the vertical line hits the circle (maybe 60°)?

However, for the smaller circles, this simple drawing exercise becomes a mess. However, conformal maps to preserve Euclidean angles; the intersections may rotate a bit as we iterate through SL(2,Z).

Here is my incorrect code:

\begin{tikzpicture}

\draw[fill=blue!5!white, line width=0.5, draw=green] 
(0,0.5) arc (90:0:0.5)--
(0.5,0) arc (180:0:0.5)--
(1.5,0) arc (180:90:0.5)--
(2,0.5)--(2,3)--(0,3);


\draw[color=black!20!white] (0, 3)--(0, 1);
\draw[color=black!20!white] (1, 3)--(1, 1);
\draw[color=black!20!white] (2, 3)--(2, 1);


\draw[color=black!20!white] (2,0) arc (0  :180:1);
\draw[color=black!20!white] (1,0) arc (0  : 90:1);
\draw[color=black!20!white] (1,0) arc (180: 90:1);

\draw[line width = 1] (-0.5,0)--(2,0);
\draw[line width = 1] (0,3)--(0,0);

\end{tikzpicture}

enter image description here

6
  • Have you done any part of this? Can you show us that code, if that is the case? Commented Apr 17, 2017 at 18:06
  • @TorbjørnT. I have drawn a more complicated region, that I have to reduce to this case. Originally I had the radius of the circle wrong Commented Apr 17, 2017 at 18:10
  • Take a look at Draw arc in tikz when center of circle is specified. In particular \centerarc. tex.stackexchange.com/questions/66216/… Commented Apr 17, 2017 at 18:12
  • On rereading your question, I don't actually quite understand what you need. Do you just need to somehow shade/fill the pencil shape, in addition to drawing all the semicircles? And should regions A and B have different fill colors? Commented Apr 17, 2017 at 18:27
  • @TorbjørnT. it's not a polygon with segments, so I can't just use fill it is combination of line segments and circular arcs... I have provided code to show my line of thinking. Commented Apr 17, 2017 at 18:56

1 Answer 1

1

You can make use of the fact that the angle between a circles centre and its intersection with the next circle is 60 degrees, and use e.g. ({cos(60)},{sin(60)}) as a coordinate. And draw a path that includes a couple of arcs and some straight lines.

I haven't added all the labels here, do you want to reproduce your hand drawn sketch?

enter image description here

\documentclass[border=4mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=3]
\draw (-1.5,0) -- (1.5,0);
\filldraw [thin,fill=black!30] (0,0)
     arc[start angle=0,end angle=60,radius=1] -- 
      ({-cos(60)},2) -- ({cos(60)},2) -- ({cos(60)},{sin(60)}) 
     arc[start angle=120,end angle=180,radius=1];

\draw [ultra thin,densely dashed] (-1,0) arc[start angle=180,delta angle=-180,radius=1];
\foreach \x in {-1,-0.5,...,1}
  \draw (\x,2pt) -- (\x,-2pt) node[below]{$\x$};
\end{tikzpicture}
\end{document}

You must log in to answer this question.

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