[Tex/LaTex] Drawing an obtuse triangle, and marking its height

tikz-pgf

I would like to have an obtuse triangle with vertices A, B, and C drawn. The lengths of the sides are to be labeled a, b, and c. If the angle at C is the obtuse angle, the height of the triangle is to be drawn as a dashed line segment from A, and the side BC is to be extended as a dashed line segment to the point P of its intersection with the dashed line segment indicating the height of the triangle.

I would also like the angle marked with one "|" to be an interior angle, and I would like the lengths of the sides to be outside the triangle. What does [auto] in \tkzLabelSegment[auto] tell TikZ to draw?

I guess that a command like \tkzDefPointWith[orthogonal normed,K=blah](B,C) is to be used. Is there a manual describing some of the commands of tkz-euclide? I just saw that there is a command \tkzDefTriangle[equilateral] for having TikZ calculate the coordinates of the third vertex of a triangle given its two other vertices so as to get an equilateral triangle.

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}


\begin{document}

\begin{tikzpicture}

\tkzDefPoint(0,-1){C}
\tkzDefPoint(4,1){B}
\tkzDefPoint(-1,3){A}


\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\tkzLabelPoint[below](C){$C$}


\tkzDrawSegment[green!60!black](A,C)
\tkzDrawSegment[green!60!black](C,B)
\tkzDrawSegment[green!60!black](B,A)

\tkzLabelSegment[auto](B,A){$c$}
\tkzLabelSegment[auto,swap](B,C){$a$}
\tkzLabelSegment[auto,swap](C,A){$b$}


\tkzMarkAngle[size=1cm,color=cyan,mark=|](C,B,A)
\tkzMarkAngle[size=1cm,color=cyan,mark=||](C,A,B)
\end{tikzpicture}

\end{document}

enter image description here

Best Answer

Something like this?

\documentclass[tikz, border=5]{standalone}
\begin{document}
\begin{tikzpicture}
\path (120:3) coordinate (A) (0:3) coordinate (B) (0:0) coordinate (C);
\draw (A) 
  -- (B) node [at start, above left] {$A$} node [midway, above] {$c$}
  -- (C) node [at start, right]      {$B$} node [midway, below] {$a$}
  -- (A) node [at start, below]      {$C$} node [midway, below] {$b$}
  -- cycle;
\draw [dashed] (A) |- (C) node [midway, below left] {$P$};
\draw (0:.5) arc (0:120:.5) (60:.4) -- (60:.6);
\end{tikzpicture}
\end{document}

enter image description here

or this...

\documentclass[tikz, border=5]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\path (80:3) coordinate (A) (-30:3) coordinate (B) (0:0) coordinate (C);
\draw (A) 
  -- (B) node [at start, above left] {$A$} node [midway, right] {$c$}
  -- (C) node [at start, right]      {$B$} node [midway, below] {$a$}
  -- (A) node [at start, below]      {$C$} node [midway, left]  {$b$}
  -- cycle;
\coordinate (P) at ($(B)!(A)!(C)$);
\draw [dashed] (A) -- (P) node [below left] {$P$} -- (C);
\draw ($(C)!0.5cm!(B)$) arc (-30:80:.5cm) node [midway, sloped] {$|$};
\end{tikzpicture}
\end{document}

enter image description here