I give my personal answer because It's preferable to avoid to mix syntaxes ( tikz and euclide ) and I added some remarks. I take big parts from hpesoj626's answer.
Firstly, I prefer to use several parts in my code, I created tkz-euclide to do this: definition, calculations, drawings and labels. If you study tikz enough, you will be able to use only tikz and to put tkz-euclide in the trash.
Remarks about definitions
- You can use
coordinate
here from tikz but if you use another system of coordinates from tkz then you can go down some complications.
\pgfmathsetmacro
is more tikzien
but you need to add the unity after
Remarks about calculations : none it's fine
Remarks about drawings :
- In general with tkz-euclide macros come by pair like
\tkzDrawSegment
and \tkzDrawSegments
. The second is to draw several objects with the same options but if you need specific options, then you need to use the first form.
- option
add
. I added to tkz-euclide the possibility to use tikz option but I added somme specific option that I created. You can use add = n and m
to extend a line (n and m are a percent of the length of the line. I prefer this possibility because it's easy to add half of a line or to double the line.
Remarks about labels :
The same remarks about the pair of macros. You can add labels with general options or with specific ones.
Conclusion tkz-euclide is useful only if you need to draw several pictures and if you want to write rapidly your code but for one picture, I think it's preferable to study tikz.
With tkz-euclide you need to know some options from tikz.
So a tkz-euclide solution is
\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{tikzpicture}[scale=.8]
% definitions
\tkzDefPoint(0,0){Origin}
\tkzDefPoint(3.5,0){Q}
\tkzDefPoint(14,0){O}
\pgfmathsetmacro{\Radius}{2}
% calculations
\tkzTangent[from with R = O](Origin,\Radius cm) \tkzGetPoints{R}{I}
\tkzInterLC[R](Q,Origin)(Q,1.5cm) \tkzGetPoints{M}{N}
\tkzTangent[from=O](Q,M) \tkzGetPoints{S}{II}
% drawing
\tkzDrawCircle[R](Origin,\Radius cm)
\tkzDrawCircle(Q,M)
\tkzDrawSegments[ultra thick,orange,add = 0 and .2](O,R O,I)
\tkzDrawSegments[thick,gray](Origin,O)
\tkzDrawPoints(Origin,O,Q,R,I,II,S)
% labels
\tkzLabelPoints(R,S,Q,I,II,O)
\tkzLabelPoint[below right](Origin){$P$}
\tkzLabelPoints[above,text=red](R,S)
\tkzLabelPoints[above,text=blue](I,II)
\end{tikzpicture}
\end{document}
![enter image description here](https://i.stack.imgur.com/HF8l4.png)
Best Answer
pstricks-add
knows a macro for calculating and saving 10 points as nodes, the two central points and the four points on each circle. See the documentation (runtexdoc pstricks-add
) for the names: