我想创建一份报告来解决这个问题https://math.stackexchange.com/questions/1124801/crossed-ladders-problem
所以我需要用乳胶创建一些图形,以使解决方案在报告中更加清晰
这是第一个图(抱歉画得不好)
灵感来自
适应这个问题
\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}
\noindent\begin{minipage}{0.3\textwidth}% adapt widths of minipages to your needs
\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}
任何帮助都会很感激
答案1
您可以采用这个答案:
\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}