Tikz Mechanical picture Fix issues

Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
This is my code:
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.north west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.south west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
Two things to fix:
- Put ka1 and ka2 as ka3 below the respective spring.
- Fix the anchor of the springs on ma1, i don't want these on the corners but in a "nice looking way" on the left of ma1.
- Font of everything needs to be Times New Roman

tikz-pgf
add a comment |Â
up vote
6
down vote
favorite
This is my code:
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.north west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.south west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
Two things to fix:
- Put ka1 and ka2 as ka3 below the respective spring.
- Fix the anchor of the springs on ma1, i don't want these on the corners but in a "nice looking way" on the left of ma1.
- Font of everything needs to be Times New Roman

tikz-pgf
1
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one.
â marmot
1 hour ago
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
This is my code:
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.north west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.south west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
Two things to fix:
- Put ka1 and ka2 as ka3 below the respective spring.
- Fix the anchor of the springs on ma1, i don't want these on the corners but in a "nice looking way" on the left of ma1.
- Font of everything needs to be Times New Roman

tikz-pgf
This is my code:
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.north west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.south west) node[midway,below=1mm,xshift=-3mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
Two things to fix:
- Put ka1 and ka2 as ka3 below the respective spring.
- Fix the anchor of the springs on ma1, i don't want these on the corners but in a "nice looking way" on the left of ma1.
- Font of everything needs to be Times New Roman

tikz-pgf
tikz-pgf
edited 1 hour ago
AndréC
4,6221834
4,6221834
asked 1 hour ago
iacopo
62519
62519
1
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one.
â marmot
1 hour ago
add a comment |Â
1
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one.
â marmot
1 hour ago
1
1
midway in conjunction of -| is a bit tricky as this will be the coordinate of the kink. pos=0.75 is in the middle of the vertical stretch and pos=0.25 in the middle of the horizontal one.â marmot
1 hour ago
midway in conjunction of -| is a bit tricky as this will be the coordinate of the kink. pos=0.75 is in the middle of the vertical stretch and pos=0.25 in the middle of the horizontal one.â marmot
1 hour ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
To make adjustments to the positions of the labels you can use
xshiftandyshiftYou can also adjust the coordinates of
(m_a1.north west)and(m_a1.south west)usingxshiftandyshift. These go inside using square brackets, e.g.([yshift=-1mm]m_a1.north west).For a Times New Roman style font, I recommend using
newtx.

documentclass[margin=1cm]standalone
usepackagetikz
usepackagenewtxtext,newtxmath
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- ([yshift=-1.5mm]m_a1.north west) node[midway,above=2mm,xshift=28mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.8cm,post length=0.65cm,segment length=6] (m_5.north) |- ([yshift=1.5mm]m_a1.south west) node[midway,below=1mm,xshift=9mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
Slightly different from Milo's nice answer.
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one. I thus propose just to play withpos=...instead of adding too manyxshifts.north westcorresponds to135. If you use145instead you are slightly below north west.- I am not an expert on fonts, sorry.
Here's the code.
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -|
(m_3.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=2pt,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -|
(m_4.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -|
(m_5.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=2pt,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.145)
node[pos=0.8,below=2pt,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.215)
node[pos=0.7,below=2pt,draw=none]$k_a2$ ;
endtikzpicture
enddocument

+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
To make adjustments to the positions of the labels you can use
xshiftandyshiftYou can also adjust the coordinates of
(m_a1.north west)and(m_a1.south west)usingxshiftandyshift. These go inside using square brackets, e.g.([yshift=-1mm]m_a1.north west).For a Times New Roman style font, I recommend using
newtx.

documentclass[margin=1cm]standalone
usepackagetikz
usepackagenewtxtext,newtxmath
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- ([yshift=-1.5mm]m_a1.north west) node[midway,above=2mm,xshift=28mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.8cm,post length=0.65cm,segment length=6] (m_5.north) |- ([yshift=1.5mm]m_a1.south west) node[midway,below=1mm,xshift=9mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
To make adjustments to the positions of the labels you can use
xshiftandyshiftYou can also adjust the coordinates of
(m_a1.north west)and(m_a1.south west)usingxshiftandyshift. These go inside using square brackets, e.g.([yshift=-1mm]m_a1.north west).For a Times New Roman style font, I recommend using
newtx.

documentclass[margin=1cm]standalone
usepackagetikz
usepackagenewtxtext,newtxmath
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- ([yshift=-1.5mm]m_a1.north west) node[midway,above=2mm,xshift=28mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.8cm,post length=0.65cm,segment length=6] (m_5.north) |- ([yshift=1.5mm]m_a1.south west) node[midway,below=1mm,xshift=9mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
add a comment |Â
up vote
4
down vote
up vote
4
down vote
To make adjustments to the positions of the labels you can use
xshiftandyshiftYou can also adjust the coordinates of
(m_a1.north west)and(m_a1.south west)usingxshiftandyshift. These go inside using square brackets, e.g.([yshift=-1mm]m_a1.north west).For a Times New Roman style font, I recommend using
newtx.

documentclass[margin=1cm]standalone
usepackagetikz
usepackagenewtxtext,newtxmath
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- ([yshift=-1.5mm]m_a1.north west) node[midway,above=2mm,xshift=28mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.8cm,post length=0.65cm,segment length=6] (m_5.north) |- ([yshift=1.5mm]m_a1.south west) node[midway,below=1mm,xshift=9mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
To make adjustments to the positions of the labels you can use
xshiftandyshiftYou can also adjust the coordinates of
(m_a1.north west)and(m_a1.south west)usingxshiftandyshift. These go inside using square brackets, e.g.([yshift=-1mm]m_a1.north west).For a Times New Roman style font, I recommend using
newtx.

documentclass[margin=1cm]standalone
usepackagetikz
usepackagenewtxtext,newtxmath
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -| (m_3.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=1mm,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -| (m_4.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -| (m_5.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=1mm,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- ([yshift=-1.5mm]m_a1.north west) node[midway,above=2mm,xshift=28mm,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.8cm,post length=0.65cm,segment length=6] (m_5.north) |- ([yshift=1.5mm]m_a1.south west) node[midway,below=1mm,xshift=9mm,draw=none]$k_a2$ ;
endtikzpicture
enddocument
answered 1 hour ago
Milo
5,74321345
5,74321345
add a comment |Â
add a comment |Â
up vote
4
down vote
Slightly different from Milo's nice answer.
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one. I thus propose just to play withpos=...instead of adding too manyxshifts.north westcorresponds to135. If you use145instead you are slightly below north west.- I am not an expert on fonts, sorry.
Here's the code.
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -|
(m_3.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=2pt,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -|
(m_4.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -|
(m_5.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=2pt,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.145)
node[pos=0.8,below=2pt,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.215)
node[pos=0.7,below=2pt,draw=none]$k_a2$ ;
endtikzpicture
enddocument

+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
add a comment |Â
up vote
4
down vote
Slightly different from Milo's nice answer.
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one. I thus propose just to play withpos=...instead of adding too manyxshifts.north westcorresponds to135. If you use145instead you are slightly below north west.- I am not an expert on fonts, sorry.
Here's the code.
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -|
(m_3.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=2pt,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -|
(m_4.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -|
(m_5.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=2pt,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.145)
node[pos=0.8,below=2pt,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.215)
node[pos=0.7,below=2pt,draw=none]$k_a2$ ;
endtikzpicture
enddocument

+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Slightly different from Milo's nice answer.
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one. I thus propose just to play withpos=...instead of adding too manyxshifts.north westcorresponds to135. If you use145instead you are slightly below north west.- I am not an expert on fonts, sorry.
Here's the code.
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -|
(m_3.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=2pt,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -|
(m_4.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -|
(m_5.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=2pt,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.145)
node[pos=0.8,below=2pt,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.215)
node[pos=0.7,below=2pt,draw=none]$k_a2$ ;
endtikzpicture
enddocument

Slightly different from Milo's nice answer.
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one. I thus propose just to play withpos=...instead of adding too manyxshifts.north westcorresponds to135. If you use145instead you are slightly below north west.- I am not an expert on fonts, sorry.
Here's the code.
documentclassstandalone
usepackagetikz
usetikzlibrarycalc,patterns,decorations.pathmorphing,decorations.markings,positioning
begindocument
tikzsetspring/.style=thick,decorate,decoration=zigzag,pre length=0.3cm,post
length=0.3cm,segment length=6,
short spring/.style=thick,decorate,decoration=zigzag,pre length=0.05cm,post
length=0.05cm,segment length=6,
damper/.style=thick,decoration=markings,
mark connection node=dmp,
mark=at position 0.5 with
node (dmp) [thick,inner sep=0pt,transform shape,rotate=-90,minimum
width=15pt,minimum height=3pt,draw=none] ;
draw [thick] ($(dmp.north east)+(2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
, decorate,
ground/.style=fill,pattern=north east lines,draw=none,minimum
width=0.75cm,minimum height=0.3cm,
ground_magenta/.style=fill,pattern=north east lines,pattern color=magenta,draw=none,minimum
width=0.75cm,minimum height=0.3cm
begintikzpicture[every node/.style=draw,outer sep=0pt,thick,font=sffamily]
%ORIGINAL SYSTEM
node (m_1) [minimum width=1cm,minimum height=0.8cm]$m_1$;
node (m_2)[right of= m_1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_2$;
draw [spring] (m_1.east) -- (m_2.west) node[midway,below=1mm,draw=none]$k_12$;
node (ground1) at (m_1.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground1.south west) -- (ground1.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground1.south) -| (m_1.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g1$ ;
node (m_3)[right of= m_2,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_3$;
draw [spring] (m_2.east) -- (m_3.west) node[midway,below=1mm,draw=none]$k_23$;
node (ground2) at (m_2.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground2.south west) -- (ground2.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground2.south) -| (m_2.south) node[midway,below=1mm,xshift=-3mm,draw=none]$k_g2$ ;
node (m_4)[right of= m_3,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_4$;
draw [spring] (m_3.east) -- (m_4.west) node[midway,below=1mm,draw=none]$k_34$;
node (ground3) at (m_3.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground3.south west) -- (ground3.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground3.south) -|
(m_3.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g3$ ;
node (m_5)[right of= m_4,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm]$m_5$;
draw [spring] (m_4.east) -- (m_5.west) node[midway,below=2pt,draw=none]$k_45$;
node (ground4) at (m_4.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground4.south west) -- (ground4.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground4.south) -|
(m_4.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g4$ ;
node (ground5) at (m_5.south west) [ground,yshift=-0.8cm,xshift=-0.5cm,rotate=90,anchor=north] ;
draw (ground5.south west) -- (ground5.south east);
draw [thick,decorate,decoration=zigzag,pre
length=0.1cm,post length=0.85cm,segment length=6] (ground5.south) -|
(m_5.south) node[midway,below=2pt,xshift=-3mm,draw=none]$k_g5$ ;
node (m_a1)[right of= m_5,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,yshift=1cm,ultra thick]$m_a1$;
node (m_a2)[right of= m_a1,node distance=2.5cm,minimum width=1cm,minimum height=0.8cm,ultra thick]$m_a2$;
draw [spring,ultra thick] (m_a1.east) -- (m_a2.west) node[midway,below=2pt,draw=none]$k_a3$;
draw [ultra thick,decorate,decoration=zigzag,pre
length=3cm,post length=0.85cm,segment length=6] (m_4.north) |- (m_a1.145)
node[pos=0.8,below=2pt,draw=none]$k_a1$ ;
draw [ultra thick,decorate,decoration=zigzag,pre
length=0.5cm,post length=0.85cm,segment length=6] (m_5.north) |- (m_a1.215)
node[pos=0.7,below=2pt,draw=none]$k_a2$ ;
endtikzpicture
enddocument

answered 1 hour ago
marmot
69.6k476148
69.6k476148
+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
add a comment |Â
+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
+1 from me. :-)
â Milo
55 mins ago
+1 from me. :-)
â Milo
55 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
@Milo Thanks. I upvoted your recent answers, too, and of course the one above.
â marmot
53 mins ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457344%2ftikz-mechanical-picture-fix-issues%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password

1
midwayin conjunction of-|is a bit tricky as this will be the coordinate of the kink.pos=0.75is in the middle of the vertical stretch andpos=0.25in the middle of the horizontal one.â marmot
1 hour ago