[Tex/LaTex] How to calculate a square root of the area

calculationstkz-euclide

I am trying to tikz-euclide the following picture (it is made in Geogebra).
enter image description here

Two solid circles are equal. To guarantee that, the length of the red segment should be \sqrt{S}, where S is the area of this right triangle. Let's suppose that we know all the coordinates of A, B and C. How to construct point D such that AD=\sqrt{S}? (S=0.5*AC*BC) Is there any easy way besides the straightforward solution of a corresponding construction problem?

I started like this:


\documentclass[a4paper, 10pt]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}

\begin{tikzpicture}[scale=1]
\tkzInit[xmin=-1, xmax=9, ymin=-0.5, ymax=4]
\tkzClip

\tkzDefPoints{0/0/B, 8/0/A, 6/0/h}

\tkzDefMidPoint(A,B) \tkzGetPoint{M} %here we construct a right triangle
\tkzDefLine[orthogonal=through h](B,A) \tkzGetPoint{h1}
\tkzInterLC(h,h1)(M,A)\tkzGetPoints{C}{w} 
%Here we have got point C as an intersection of the circle with
%diameter  AB and a perpendicular to Ab from
%h(6,0) - random point on the hypotenuse

\tkzInCenter(A,B,C)\tkzGetPoint{I}
\tkzDefPointBy[projection=onto B--A](I) \tkzGetPoint{K}

\tkzLabelPoint[above](C){$C$}
\tkzLabelPoint[below right](A){$A$}
\tkzLabelPoint[below left](B){$B$}
\tkzLabelPoint[above right](I){$I$}
\tkzMarkRightAngle[size=0.2](A,C,B)

\tkzDrawPolygon[very thick](A,B,C)
\tkzDrawCircle(I,K)
\tkzDrawPoints(C,A,B,I,K)
\end{tikzpicture}
\end{document}

The output is beautiful and predictable as usual (than's to Alalin Matthes 🙂
enter image description here

The next step is point D and I am stuck. Thank's to everyone.

Best Answer

Notice this is only an idea. I am not sure at all that the dimensions are correctly treated here...

If the problem is to find the value of the circle radius, I built upon `let` operation in tikz and made this:

\documentclass[margin=20pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,positioning,calc}
\begin{document}
\begin{tikzpicture}[
    ]
    \coordinate (A) at (8,0);
    \coordinate (B) at (0,0);
    \coordinate (C) at (0,6);
    \draw (A) -- (B) -- (C) -- cycle;
    \draw[red] let \p1 = ($ (B) - (A) $),
              \p2 = ($ (B) - (C) $),
              \n1 = {sqrt(veclen(\x1,\y1))*sqrt(veclen(\x2,\y2)/2)}
        in
            (B) circle[radius=\n1];
          
\end{tikzpicture}
\end{document}

which seems to give something reasonable: enter image description here

...the strange way to calculate the radius is to avoid a dimension too big error in the processing. I tried, but I am unable to use expl3 math here...