Lines not tangent as expected

The starting magic number 80° for angles SOM and TOM is wrong, if you want to have tangents. The angle can be easily calculated by looking at the triangle OSM with one orthogonal angle at the tangent point S (the result is about 70.5°).

Also I would calculate the coordinates of L and N as polar coordinates with origin O. This can again be done looking at the triangle OLS that also has a orthogonal angle at the tangent point S.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}

\pgfmathsetmacro\BigRadius{9/4}
\pgfmathsetmacro\SmallRadius{3/4}
% \Angle is the angle part of the polar coordinate of S with origin O
% 180 - acos(\SmallRadius/\BigRadius} = 109.47102
\pgfmathsetmacro\Angle{180 - acos(1/3)}
\pgfmathsetmacro\AngleTwo{2*\Angle - 180}

% Coordinates
\path
  coordinate (O) at (0, 0)
  coordinate (S) at (\Angle:\SmallRadius)
  coordinate (T) at (-\Angle:\SmallRadius)
  coordinate (M) at (-\BigRadius, 0)
  coordinate (L) at (\AngleTwo:\BigRadius)
  coordinate (N) at (-\AngleTwo:\BigRadius)
;

% Two concentric circles and lines
\draw[line join=bevel]
  (O) circle[radius=\SmallRadius]
  (O) circle[radius=\BigRadius]
  (L) -- (M) -- (N)
;

% Points
\fill[radius=1.5pt]
  \foreach \p in {O, S, T, M, L, N} { (\p) circle[] }
;

% The labels
\path[inner sep=0pt, node font=\footnotesize]
  node[anchor=west] at ($(O) +(0.1,0)$){$O$}
  node[anchor=east] at ($(M) +(-0.15,0)$){$M$}
  node[anchor={\AngleTwo+180}] at ($(L) +(20:0.15)$){$L$}
  node[anchor={-\AngleTwo+180}] at ($(N) +(-20:0.15)$){$N$}
  node[anchor={\Angle-180}] at ($(S) +(80:0.15)$){$S$}
  node[anchor={-\Angle+180}] at ($(T) +(-80:0.15)$){$T$}
;
\end{tikzpicture}
\end{document}

Result

Big radius and angle are given

The small radius can be calculated with the right triangle MSO. Because the example above has used macros, only the macro definitions for \Angle and \SmallRadius need to be changed:

\def\Angle{100}
\pgfmathsetmacro\BigRadius{9/4}
% \Angle is the angle part of the polar coordinate of S with origin O
% Then the small radius can be calculated:
% \SmallRadius = \BigRadius * cos(180 - \Angle) = 0.3907
\pgfmathsetmacro\SmallRadius{\BigRadius * cos(180 - \Angle)}
\pgfmathsetmacro\AngleTwo{2*\Angle - 180}

Result with angle 100

Tags:

Tikz Pgf