\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\usepackage{tkz-euclide}

\usetkzobj{all}

\begin{document}
   \begin{tikzpicture}
       %Define coordinates
       \coordinate (A) at (1,2);
       \coordinate (B) at (-3,1);
       \coordinate (C) at (0,-3);
       
       %%draw the triangle
       \draw (A) -- (B) -- (C) -- cycle;
       
       %Draw nodes with titles
       \filldraw (A) circle(1pt) node[right] {$A$};
       \filldraw (B) circle(1pt) node[left]  {$B$};
       \filldraw (C) circle(1pt) node[anchor=north west] {$C$};
       
       %Calculate projections
       \coordinate (AA) at ($(B)!(A)!(C)$);
       \coordinate (BB) at ($(A)!(B)!(C)$);
       \coordinate (CC) at ($(A)!(C)!(B)$);
       
       %Draw projections
       \filldraw (AA) circle(1pt);
       \filldraw (BB) circle(1pt);
       \filldraw (CC) circle(1pt);
             
             
       %Projection titles
       \node at ($(AA)!-0.1!(A)$) {$A_\perp$};
       \node at ($(BB)!-0.1!(B)$) {$B_\perp$};
       \node at ($(CC)!-0.1!(C)$) {$C_\perp$};
       
       %Draw heights - name paths
       \draw[dashed,name path=A] (A) -- (AA);
       \draw[dashed,name path=B] (B) -- (BB);
       \draw[dashed,name path=C] (C) -- (CC);
       
       %Mark right angle
       \tkzMarkRightAngle[color=lightgray](A,AA,B);
       \tkzMarkRightAngle[color=lightgray](B,BB,C);
       \tkzMarkRightAngle[color=lightgray](C,CC,A);
       
       %Calculate intersection
       \coordinate [name intersections={of=A and B,by=M}];
       \filldraw (M) circle(2pt) node[below] {$\mathcal{O}~$};
   \end{tikzpicture}
\end{document}

