TikZ-PGF – Help Drawing a More Sophisticated Right Triangle

drawtikz-pgf

I am preparing a geometry note file for my students and I am trying to reproduce a figure I saw on Wikipedia in the proof of the Pythagorean theorem. Here is the figure
enter image description here

I can draw a right triangle with tikz after some trial and error, but I do not know how to color the interiors of the shapes, label the vertices, label the angles as nicely as shown in the figure below, drop a perpendicular, and mark the angles with arcs or a square for a right angle as in H and C vertices. I am a math teacher by profession and my computer and TeX proficiency are minimal. I would certainly appreciate any help with this. My aim is to create my own figures so as not to plagiarize. I thank all helpers.

Edit: here is my code for a right triangle

\begin{tikzpicture}[scale=1.25]

\coordinate (A) at (-1.5cm,-1.cm);
\coordinate (C) at (1.5cm,-1.0cm);
\coordinate (B) at (1.5cm,1.0cm);
\draw (A) --  (B) --  (C) -- (A);

\end{tikzpicture}

Best Answer

I propose this solution with the pst-eucl module of pstricks, which can mimick constructions of plane geometry:

\documentclass[border=6pt]{standalone}
\usepackage[x11names,svgnames]{xcolor}%
\usepackage{pst-eucl}

\begin{document}

\begin{pspicture}(-1,-1)(7,5)
\psset{PointSymbol=none, linejoin=1,CodeFigStyle=solid, CodeFigColor=black}
\pstTriangle[PosAngle={120,-130,-30}](0,4){A}(0,0){C}(6,0){B}
\pstProjection[CodeFig]{B}{A}{C}[H]\psline(C)(H)
\pspolygon*[linecolor=LightSteelBlue2!90](B)(H)(C)
\pspolygon*[linecolor=YellowGreen!30](C)(H)(A)
\psset{linewidth=0.6pt}
\psline(H)(A)(C)(H)(B)(C)
\psset{MarkAngleRadius=0.8, RightAngleSize=0.25, LabelSep=0.6}%, LabelSep=-0.2cm}
\pstMarkAngle{H}{C}{A}{$\theta$} \pstMarkAngle{B}{C}{H}{}\pstMarkAngle{B}{C}{H}{}
\pstMarkAngle{H}{B}{C}{$\theta$}
\pstMarkAngle{C}{A}{H}{}
\psset{MarkAngleRadius=0.6} 
\pstMarkAngle{B}{C}{H}{}
\pstMarkAngle{C}{A}{H}{}
\pstRightAngle{B}{C}{A} \pstRightAngle{C}{H}{A}
\end{pspicture}

\end{document}

enter image description here