This is a follow-up question to Drawing Mechanical Systems in LaTeX. I have tried to do similar things, i.e. to model simple mechanical systems.
For example:
\begin{tikzpicture}[M1/.style={rectangle,draw=black,minimum size=2cm,thick}]
\tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.3cm,post length=0.3cm,segment length=5}]
\tikzstyle{ground}=[fill,pattern=north east lines,draw=none,minimum width=0.75cm,minimum height=0.3cm]
\node [M1] (M1) {};
\node (wall1) [ground, minimum width=3cm,yshift=-3cm] {};
\draw (wall1.north west) -- (wall1.north east);
\draw [spring] (wall1.170) -- ($(M1.south east)!(wall1.170)!(M1.south west)$) node[pos=.5,left] {$k_2$};
\draw [spring] (wall1.10) -- ($(M1.south west)!(wall1.10)!(M1.south east)$) node[pos=.5,right] {$k_3$};
\node (wall2) [ground, minimum width=3cm,yshift=3cm] {};
\draw (wall2.south west) -- (wall2.south east);
\draw [spring] (wall2.170) -- ($(M1.north east)!(wall2.170)!(M1.north west)$) node[pos=.5,left] {$k_1$};
\draw [-latex,thick] (1.5,0) -- (1.5,1) node [pos=.5,right] {$x$};
\filldraw circle (.05) node [pos=.5,below] {\tiny $CG$};
\node [rotate=90,above] at (M1.west) {Mass,$m$};
\node at (0,-3.5) {(a)};
\begin{scope}[xshift=5cm]
\node [M1] (M1) {};
\node (wall1) [ground, minimum width=3cm,yshift=-3cm] {};
\draw (wall1.north west) -- (wall1.north east);
\draw [spring] (wall1) -- ($(M1.south east)!(wall1)!(M1.south west)$) node[pos=.5,left] {$k_2^*$};
\node (wall2) [ground, minimum width=3cm,yshift=3cm] {};
\draw (wall2.south west) -- (wall2.south east);
\draw [spring] (wall2) -- ($(M1.north east)!(wall2)!(M1.north west)$) node[pos=.5,left] {$k_1$};
\draw [-latex,thick] (1.5,0) -- (1.5,1) node [pos=.5,right] {$x$};
\filldraw circle (.05) node [pos=.5,below] {\tiny $CG$};
\node [rotate=90,above] at (M1.west) {Mass,$m$};
\node at (0,-3.5) {(b)};
\end{scope}
\end{tikzpicture}
Now I have the following problem:
The spring k1 in part a is connected to the wall, but to the wrong side. I have tried several things, but nothing worked.
Link: Drawing Mechanical Systems in LaTeX
Figure here:


!in front of it. This makes it a link to the image, which is allowed for low-rep users. – Martin Scharrer Jul 05 '11 at 12:35