How to draw over an picture in TikZ?
If you're talking about the circle with the m
in it, it is not behind the rod, but it isn't filled either -- it consists of a black circle with the letter m
in it. Add fill=white
to the node settings.
\documentclass{scrartcl}
\usepackage{stanli}
\begin{document}
\begin{tikzpicture}
%the points
\point{above}{0}{5};
\point{above_middle}{0}{4};
\point{below_middle}{0}{1};
\point{below}{0}{0};
%the rod
\beam{2}{above}{above_middle};
\beam{2}{below}{below_middle};
%the support
\support{1}{above}[180];
\hinge{1}{above};
%the mass
\node at (below) [circle, draw,fill=white] {$m$}; % <----- added fill=white
%the free body diagram (for the rod)
%S
\point{S}{0}{3};
\load{1}{S}[90];
\notation{1}{S}{$S$};
%-S
\point{-S}{0}{2};
\load{1}{-S}[-90];
\notation{1}{-S}{$S$}[below right];
\end{tikzpicture}
A PSTricks solution.
\documentclass[pstricks]{standalone}
\usepackage{pst-node}
\begin{document}
\begin{pspicture}(-1,.2)(1,-4.4)
% top part
\psframe[fillstyle=vlines,hatchsep=1pt,linestyle=none](-1,.2)(1,0)
\psline(-1,0)(1,0)
\pnode(-.5,0){L}
\pnode(.5,0){R}
\pnode(0,-2){S}
\rput(0,-1){\Cnode[radius=5pt]{C}}
\ncline{L}{C}
\ncline{C}{R}
\ncline{->}{C}{S}
\naput[npos=1]{$S$}
% bottom part
\pnode(0,-3){S'}
\rput(0,-4){\Circlenode[radius=10pt]{m}{$m$}}
\ncline{->}{m}{S'}\nbput[npos=1]{$S$}
\end{pspicture}
\end{document}