I am in dire need of constructing the image below. In short I am trying to create an exact replica of the image, and an alternative image, with a much more jagged hypotenuse.
I thought about using a for loop in latex, but being as inexperienced as me, this proved difficult. My intital progress has been shown below
\documentclass[10pt,a4paper]{minimal}
\usepackage{tikz,tkz-euclide}
\usepackage{mathtools,amssymb,amsmath}
\begin{document}
\begin{tikzpicture}[scale=4]
\def \a{5}
\tkzDefPoint(0,0){O} \tkzDefPoint(1,0){A} \tkzDefPoint(1,1){B}
\tkzDrawSegments(O,A A,B)
\tkzLabelSegment[below](O,A){1} \tkzLabelSegment[right](A,B){1}
\tkzLabelPoints[below left](O) \tkzLabelPoints[below right](A) \tkzLabelPoints[above right](B)
\foreach \i in {0,...,\a}{
\tkzDrawSegment( ( \i:\a, \i:\a ),( \i:\a,(\i+1):\a ) )}
\end{tikzpicture}
%\tkzDrawSegment( ( \i:\a,(\i+1):\a ),((\i+1):\a,(\i+1):\a))
\end{document}
Any help would be greatly appreciated. My problem is creating the for loop. I just can not get it right, I think the problem is latex evaluating 0/4 and 1/3 as symbols not numbers