I am trying to draw perpendicular from O in right angled triangle (OAB) to the hypotenuse. From the foot of perpendicular (say X0) of it, two perpendiculars are drawn to rectangular axis with foot of perpendiculars A0 and B0. Again, from O, the perpendicular is drawn to A0B0 line, with the foot perpendiculars on axes as A1 and B1. I want to repeat this process for 2-3 times. I have reached the following point so far.

```
\documentclass[varwidth]{standalone}
\usepackage{tkz-euclide}
\usepackage{tikz}
\usepackage{xcolor}
\usetikzlibrary{calc,spy}
\makeatletter
\usetikzlibrary{angles, intersections, positioning, quotes}
\usepackage{siunitx}
\begin{document}
\centering
\begin{tikzpicture}[x=2cm,y=2cm,
        spy using outlines={circle, size=3cm, connect spies}]
    \path  (0,0) coordinate[label=left:\Large $O$] (O) (0,3) coordinate[label=left:\Large $B$] (B) (4,0) coordinate[label=right:\Large $A$] (A);
    \draw [thick, black] (O) -- (B) -- (A) -- cycle;
    \draw [black!90, thick] (O) --  ($(B)!(O)!(A)$);
    \fill [red!70] ($(B)!(O)!(A)$) node[right]{\Large $X_0$};
\end{tikzpicture}
\end{document}

```

I am stuck at X0. How to get the foot of perpendicular in the latex code?

[![enter image description here](https://i.stack.imgur.com/Y4o7u.png)](https://i.stack.imgur.com/Y4o7u.png)