Car game figure alignment fix
authorThomas Pietrzak <thomas.pietrzak@gmail.com>
Sun, 20 Feb 2022 10:27:04 +0000 (11:27 +0100)
committerThomas Pietrzak <thomas.pietrzak@gmail.com>
Sun, 20 Feb 2022 10:27:04 +0000 (11:27 +0100)
figures/cargame.tex
mystyle.sty

index 2c6e7bbb472711c42aaf07b8e829ae3d9e4127a4..2f1f8c8b83e0d020a18feb105cdb3d3810a45392 100644 (file)
@@ -21,7 +21,7 @@
       \fill[black!80] (0,0) circle (8);
       %\fill[fill=white,] (0,1) .. controls (1,1) and (0.83,0.67) .. (1,1) -- cycle;
       \fill[black!20] (0,3) to[out=0,in=90] (5,-2) to[out=210,in=330] (-5,-2) to[out=90,in=180]  cycle;
-      \draw[black!80, thick] (0,0) circle (2);
+      \draw[black!50, thick] (0,0) circle (2);
       \fill[white] (0,6) to[out=0,in=120] (6,2) to[out=300,in=330] (5,1) to[out=150,in=0] (0,2.2) to[out=180,in=30] (-5,1) to[out=210,in=240] (-6,2) to[out=60,in=180] cycle;
       \fill[white] (2.1,-1) to[out=30,in=120] (5.5,-2) to[out=300,in=330] (2,-6) to[out=150,in=210] cycle;
       \fill[white] (-2.1,-1) to[out=150,in=60] (-5.5,-2) to[out=240,in=210] (-2,-6) to[out=30,in=330] cycle;
@@ -29,9 +29,9 @@
   }
   \definecolor{cellred}{rgb}    {0.98,0.17,0.15}
   \definecolor{cellblue}{rgb}    {0.17,0.60,0.99}
-  \includegraphics[height=3.7cm]{figures/vdrift}
+  \includegraphics[width=7.1cm,valign=t]{figures/vdrift}
   \hfill
-  \begin{minipage}[t]{10.3cm}
+  \adjustbox{valign=t,minipage=9.7cm}{
     \centering
     \tikzexternalenable
     \begin{tikzpicture}[x=1mm,y=1mm,outer sep=0pt, inner sep=0pt, inner frame sep=0]%, background rectangle/.style={fill=cellblue}, show background rectangle]
         \wheel{90}
         \vibrators{white}{white}{white}{cellred}
       \end{scope}
-      \begin{scope}[xshift=60]
+      \begin{scope}[xshift=57]
         \wheel{45}
         \vibrators{cellred}{white}{white}{cellred}
       \end{scope}
-      \begin{scope}[xshift=120]
+      \begin{scope}[xshift=114]
         \wheel{0}
         \vibrators{cellred}{white}{white}{white}
       \end{scope}
-      \begin{scope}[xshift=180]
+      \begin{scope}[xshift=171]
         \wheel{-45}
         \vibrators{cellred}{cellred}{white}{white}
       \end{scope}
-      \begin{scope}[xshift=240]
+      \begin{scope}[xshift=228]
         \wheel{-90}
         \vibrators{white}{cellred}{white}{white}
       \end{scope}
     \end{tikzpicture}
-    \vspace{1mm}
+
     \begin{tikzpicture}[x=1mm,y=1mm, node distance=0.5mm]
         \node[fill=cellred, draw=black!50, circle] (full) at (0,0) {};
         \node[right=of full, anchor=west] {250Hz vibration};
         \node[fill=white, draw=black!40, circle] (none) at (50,0) {};
         \node[right=of none, anchor=west] {no vibration};
     \end{tikzpicture}
+
     \tikzexternaldisable
-  \end{minipage}
+  }
+
   \caption[Car racing game with gestural interaction]{Screenshot of the customized version of VDrift, an open-source car racing game. The right side shows the mapping of the vibrotactile feedback depending on the steering angle.}
   \label{fig:cargame}
 \end{figure}
index fab83f6916364fa6cd23eb05a732cb6e83826531..10b34d18b4b09385d059bb8650594bf943d08025 100644 (file)
@@ -11,6 +11,9 @@
 \usepackage{xstring}
 \usepackage[ddmmyyyy,hhmmss]{datetime}
 
+\usepackage[export]{adjustbox}
+\usepackage{lipsum}
+
 \usepackage{pgfplots}
 \usepackage{tikz}
 \usetikzlibrary{calc,arrows.meta,arrows,positioning,decorations.text,backgrounds}