aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/kra
diff options
context:
space:
mode:
authorsamuel niederer <samuel.niederer@ost.ch>2022-05-26 11:46:24 +0200
committersamuel niederer <samuel.niederer@ost.ch>2022-05-26 11:46:24 +0200
commita0b6394bd559e7d2e1a6d7c028cfc73586503d58 (patch)
tree32c6c6408ea7fe36412280a97f51f490c31df7b2 /buch/papers/kra
parentadd spring constant (diff)
downloadSeminarSpezielleFunktionen-a0b6394bd559e7d2e1a6d7c028cfc73586503d58.tar.gz
SeminarSpezielleFunktionen-a0b6394bd559e7d2e1a6d7c028cfc73586503d58.zip
add drawing
Diffstat (limited to '')
-rw-r--r--buch/papers/kra/images/multi_mass_spring.tex54
1 files changed, 54 insertions, 0 deletions
diff --git a/buch/papers/kra/images/multi_mass_spring.tex b/buch/papers/kra/images/multi_mass_spring.tex
new file mode 100644
index 0000000..f255cc8
--- /dev/null
+++ b/buch/papers/kra/images/multi_mass_spring.tex
@@ -0,0 +1,54 @@
+% create tikz drawing of a multi mass multi spring system
+
+\tikzstyle{vmline}=[red, dashed,line width=0.4,dash pattern=on 1pt off 1pt]
+\tikzstyle{ground}=[pattern=north east lines]
+\tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1,top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20]
+\tikzstyle{spring}=[line width=0.8,blue!7!black!80,snake=coil,segment amplitude=5,line cap=round]
+
+\begin{tikzpicture}[scale=2]
+ \newcommand{\ticks}[3]
+ {
+ % x, y coordinates
+ \draw[thick] (#1, #2 - 0.1 / 2) --++ (0, 0.1) node[scale=0.8,below=0.2] {#3};
+ }
+ \tikzmath{
+ \hWall = 1.2;
+ \wWall = 0.3;
+ \lWall = 5;
+ \hMass = 0.6;
+ \wMass = 1.1;
+ \xMass1 = 1.0;
+ \xMass2 = 3.0;
+ \xAxisYpos = 0;
+ \originX1 = 0;
+ \originY1 = 0.5;
+ \springscale=7;
+ }
+
+ % create axis
+ \draw[->,thick] (0,\xAxisYpos) --+ (\xMass2 + \wMass, 0) node[right]{$q$};
+ % create ticks on x / q axis
+ \ticks{\xMass1}{\xAxisYpos}{$q_{1}$}
+ \ticks{\xMass2}{\xAxisYpos}{$q_{2}$}
+
+ % create non-moving backgrounds
+ \draw[ground] (\originX1, \originY1) ++ (0, 0) --+(\lWall,0) --+(\lWall, \hWall)
+ --+ (\lWall - \wWall, \hWall) --+(\lWall - \wWall, \wWall) --+ (\wWall, \wWall) --+(\wWall, \hWall) --+(0, \hWall) -- cycle;
+
+ % create masses
+ \draw[mass] (\originX1, \originY1) ++ (\xMass1, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m_{1}$};
+ \draw[mass] (\originX1, \originY1) ++ (\xMass2, \wWall) rectangle ++ (\wMass,\hMass) node[midway] {$m_{2}$};
+
+ % create springs
+ \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+ (\wWall, \wWall + \hMass / 2) --++ (\xMass1 - \wWall, 0) node[midway,above=0.2] {$k_1$};
+ \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+ (\xMass1 + \wMass, \wWall + \hMass / 2) --++ (\xMass2 - \xMass1 - \wMass, 0) node[midway,above=0.2] {$k_c$};
+ \draw[spring, segment length=(\xMass1 - \wWall) * \springscale] (\originX1, \originY1) ++
+ (\xMass2 + \wMass, \wWall + \hMass / 2) --++ (\lWall - \xMass2 - \wMass - \wWall, 0) node[midway,above=0.2] {$k_2$};
+
+ % create vertical measurement line
+ \draw[vmline] (\xMass1, \xAxisYpos) --+(0, \originY1 + \wWall);
+ \draw[vmline] (\xMass2, \xAxisYpos) --+(0, \originY1 + \wWall);
+
+\end{tikzpicture}