Code: Select all
\begin{tikzpicture}[scale=1.5]
Code: Select all
\begin{tikzpicture}
% Left wall
\draw[very thick] (0,-.5) -- (0,.5);
% First spring (s_0)
\draw (0,0) -- (0+.25,0);
\draw (0+.375,-.0125) ellipse (1.25mm and 1.25mm)
(0+.500,-.0125) node [above,outer sep=2pt,name=s0] {$s_{_0}$} ellipse (1.25mm and 1.25mm)
(0+.625,-.0125) ellipse (1.25mm and 1.25mm);
\draw (0+.75,0) -- (0+1,0);
% First two masses and two springs (m_1, s_1, m_2, s_2)
\foreach \x in {1,2} {
% Mass (it's just a rectangle)
\draw ((1.75*\x-.75,0) node[draw,rectangle,name=m\x,anchor=west] {$m_{_\x}$};
% Spring (three circles with connecting lines on the ends).
\draw (1.75*\x,0) -- (1.75*\x+.25,0);
\draw (1.75*\x+.375,-.0125) ellipse (1.25mm and 1.25mm)
(1.75*\x+.500,-.0125) node [above,outer sep=2pt,name=s\x] {$s_{_\x}$} ellipse (1.25mm and 1.25mm)
(1.75*\x+.625,-.0125) ellipse (1.25mm and 1.25mm);
\draw (1.75*\x+.75,0) -- (1.75*\x+1,0);
}
% Ellipses
\foreach \i in {0,...,2} {
\path (4.65+\i*.1,0) coordinate (X\i);
\fill (X\i) circle (1pt);
}
% First post-ellipses spring (s_{N-1})
\draw (5,0) -- (5.25,0);
\draw (5.375,-.0125) ellipse (1.25mm and 1.25mm)
(5.500,-.0125) node [above,outer sep=2pt,name=sN-1] {$s_{_{N-1}}$} ellipse (1.25mm and 1.25mm)
(5.625,-.0125) ellipse (1.25mm and 1.25mm);
\draw (5.75,0) -- (6,0);
% Last mass and spring (m_N, s_N).
\foreach \x in {1} {
% Mass (it's just a rectangle)
\draw (6,0) node[draw,rectangle,name=mn,anchor=west] {$m_{_N}$};
% Spring (three circles with connecting lines on the ends).
\draw (6.8,0) -- (6.8+.25,0);
\draw (6.8+.375,-.0125) ellipse (1.25mm and 1.25mm)
(6.8+.500,-.0125) node [above,outer sep=2pt,name=sn] {$s_{_N}$} ellipse (1.25mm and 1.25mm)
(6.8+.625,-.0125) ellipse (1.25mm and 1.25mm);
\draw (6.8+.75,0) -- (6.8+1,0);
}
\draw[very thick] (7.8,-.5) -- (7.8,.5);
% The original spring and mass.
% \draw (0,0) -- (.25,0);
% \draw (.375,-.0125) ellipse (1.25mm and 1.25mm)
% (.500,-.0125) node [above,outer sep=2pt,name=s0] {$s_0$} ellipse (1.25mm and 1.25mm)
% (.625,-.0125) ellipse (1.25mm and 1.25mm);
%
% \draw (.75,0) -- (1,0);
%% \draw (1,-.25) rectangle (2,.25) (1.5,0) node [name=m0] {$m_0$};
% \draw (1,0) node[draw,rectangle,name=m0,anchor=west] {$m_0$};
\end{tikzpicture}