Code: Select all
% --------- trench.tex -------- Apr.20,2015
% Scheme of loads for soil trench
% (1-vertical; 2-vertical, shifted from origin along x-axis
% 3-horizontal)
\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{center}
\setlength\PreviewBorder{10pt}
\tikzstyle{axis} = [-latex,blue!55]
\tikzstyle{two}=[x={(0.75cm,0cm)},y={(0cm,0.75cm)}]
\begin{document}
\begin{center}
\begin{tikzpicture}[two]
\coordinate (O) at (0,0);
\draw[axis] (O) -- ++(8,0) node[right] {$x$};
\draw[axis] (O) -- ++(0,6) node[above] {$y$};
% 1) --- right triangle loads + wall ----
\foreach \y in {0, 0.25,...,4.5} { % full height triangle shaped arrows
\draw[-latex] (6-\y/2.5,\y) -- (4,\y);}
% Contour
\draw [red] (4,5) -- (6,0); % closing queues arrows
\draw [blue] (4,5) -- (4, 0); % drawing wall
%
% 2) --- left load triangle + wall on y-axis ----
\foreach \y in {0, 0.25,...,4.5} { % full height triangle shaped arrows
\draw[-latex] (-2+\y/2.5,\y) -- (0,\y);}
% Contour
\draw [red] (0,5) -- (-2,0); % closing queues arrows
% 3) trench lines
\draw [blue] (4,5) -- (6, 5);
\draw [blue] (0,5) -- (-2, 5);
% 4) soil reaction
\foreach \x in {0,0.25,...,4} {
\draw[-latex] (\x,-1.5) -- ++(0,1.5); }
% Contour
\draw [red] (0,-1.5) -- (4,-1.5); % closing vertical arrows queues
%
% Caption
\draw (0.2,7) -- ++(0,0) node[right,midway] {Loads on Trench};
\end{tikzpicture}
\end{center}
\end{document}
%
% ---- EOF: trench.tex ----------
%