# figure 1 for Crossed Ladders Problem

i would like creat report for the solution of that problem https://math.stackexchange.com/questions/1124801/crossed-ladders-problem

so i need to create some figurs with latex to make solution more clear in report

here is the first figure (sorry for bad drawing )

inspired from

fixing a diagram in Homework Problem Sheet

\documentclass[12pt]{article}

\usepackage[pass]{geometry}% just to show the page margins
\usepackage{tikz}
\usepackage[demo]{graphicx}% remove demo option in actual document
\usetikzlibrary{intersections}
\usepackage{siunitx}

\begin{document}
\begin{description}
\item[Problem 1 : ]
\end{description}
\begin{tikzpicture}
\draw (-0.5,5) -- (0,5) -- (0,0) -- (5,0) -- (5,5) -- (5.5,5);
\draw[name path=A] (0,0)coordinate(o) -- (5,4.5)node[pos=0.8,sloped,auto]{\SI{10}{\meter}};
\draw[name path=B] (0,3) -- (5,0)node[pos=0.2,sloped,auto]{\SI{8}{\meter}};
\path[name intersections={of=A and B,by={a}}];
\draw[dashed] (a)node[right=1mm]{M} -- (a|-o)node[pos=0.7,auto]{\SI{3}{\meter}};
\end{tikzpicture}
\end{minipage}%
\hfill%
\begin{minipage}{0.6\textwidth}\raggedleft
Two ladders, one 10 meters long and the other 8 meters [long], have been placed in a trench as indicated in the opposite figure. Their point of intersection, M, is 3 meters from the base of the trench. What is the width of the trench?
\end{minipage}
\end{document}


• If you replace your initial "bad drawing" with Harish's answer, your question has no sense. – Ignasi Jan 29 '15 at 15:36
• @Ignasi fixed it :) – Educ Jan 29 '15 at 15:38

\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{intersections,arrows.meta}
\usepackage{siunitx}

\begin{document}

\begin{tikzpicture}
\draw (-0.5,5) -- (0,5) -- (0,0) -- (5,0) -- (5,5) -- (5.5,5);
\draw[name path=A] (0,0)coordinate(o) -- (5,4.5)node[pos=0.8,sloped,auto]{$l_2=\SI{10}{\meter}$};
\draw[name path=B] (0,3) -- (5,0)node[pos=0.1,sloped,auto]{$l_1=\SI{8}{\meter}$};
\path[name intersections={of=A and B,by={a}}];
\draw[dashed] (a)node[right=1mm]{M} -- (a|-o)node[pos=0.7,auto]{$R=\SI{3}{\meter}$}
coordinate[pos=1](a);
\coordinate (o) at (0,-0.5);
\draw[|<->|] (0,-0.5) -- node[below]{$d_1$} (a|-o);
\draw[|<->|] (5,-0.5) -- node[below]{$d_2$} (a|-o);
\draw[|<->|] (0,-1) -- node[below]{$d$} (5,-1);
\draw[|<->|] (-0.5,0) -- node[left]{$R_1$} (-0.5,3);
\draw[|<->|] (5.5,0) -- node[right]{$R_2$} (5.5,4.5);
\end{tikzpicture}

\end{document}


• You beat me, again. ;-) – Ignasi Jan 29 '15 at 15:33