Is it possible to only get the coordinate without drawing? (Or is there any other shortcut without using tkz-euclide
?
\documentclass[tikz,border=10pt]{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (4,4);
\coordinate (C) at (4,2);
\draw(A)--(B);
\tkzDrawAltitude[color=blue](A,B)(C) \tkzGetPoint{D}
\fill[red] (A) circle (2pt);
\fill[red] (B) circle (2pt);
\fill[red] (C) circle (2pt);
\fill[blue] (D) circle (2pt);
\end{tikzpicture}
\end{document}
tkz-euclide
you can try\tkzDefPointsBy[projection=onto A--B](C){D}
.