1

I need to draw two tangent circles with their common tangent. I drew the first circle centered at C radius CA, the tangent AB. Now I need to find the position of the center for the second circle on the perpendicular to AB. The radius of the circle in question is r=AB^2/(4*AC). The working code is:

\documentclass{article}
\usepackage{tikz,tkz-euclide}
\usetikzlibrary{calc}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}      
\tkzDefPoints{0/0/A, 0/4/C, 5/0/B}
\draw (A)--(B);
\draw let 
\p1 = ($ (B) - (A) $),
\p2 = ($ (C) - (A) $),
\n1 = {veclen(\x1,\y1)}, %\n1=AB
\n2 = {veclen(\x2,\y2)}, %\n2=AC
\n3 = {100*\n1/(4*\n2)} %r=100AB/4AC
in
(C) circle[radius=\n2] 
(B) circle[radius=\n3];
\tkzLabelPoint[below](A){$A$}
\tkzLabelPoint[below](B){$B$}
\tkzLabelPoint[below](C){$C$}
\end{tikzpicture}
\end{document}

It gives this: enter image description here

the problem is that number 100 in the code that is supposed to be switched into \n1. But for

  \n3 = {\n1*\n1/(4*\n2)} %r=AB^2/4AC

it just doesnt work and says:

! Dimension too large.
<recently read> \pgfmath@x 
l.14 \n3 = {\n1*\n1/(4*\n2)}                    
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

How to fix it and what is the problem?

Thanks to everyone.

0 Answers0