From deab0284c001369f0033a58e3fc7041a8d0dfb89 Mon Sep 17 00:00:00 2001 From: Thomas Pietrzak Date: Mon, 4 Oct 2021 15:57:13 +0200 Subject: [PATCH] The figure --- mystyle.sty | 2 +- tex/3-input.tex | 2 +- tex/4-loop.tex | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/mystyle.sty b/mystyle.sty index 597d49e..4b6eb56 100644 --- a/mystyle.sty +++ b/mystyle.sty @@ -10,7 +10,7 @@ \usepackage{pgfplots} \usepackage{tikz} -\usetikzlibrary{calc,arrows.meta,arrows,positioning} +\usetikzlibrary{calc,arrows.meta,arrows,positioning,decorations.text} \usepgfplotslibrary{external} %\tikzexternalize[hdrmain,prefix=tikz/] \tikzexternalize[prefix=tikz/] diff --git a/tex/3-input.tex b/tex/3-input.tex index b8df4e7..28ec64a 100644 --- a/tex/3-input.tex +++ b/tex/3-input.tex @@ -56,7 +56,7 @@ However we will discuss here the \tikzexternaldisable \caption[Input pipeline.]{Input pipeline.} \label{fig:inputpath} - \end{figure} +\end{figure} %Pseudo haptics \cite{lecuyer01} diff --git a/tex/4-loop.tex b/tex/4-loop.tex index ff92128..ebcd3fe 100644 --- a/tex/4-loop.tex +++ b/tex/4-loop.tex @@ -161,6 +161,81 @@ The point of this chapter is saying that previous chapters should be part of thi \end{figure} + +\begin{figure}[htb] + \centering + \definecolor{cellred}{rgb} {0.98,0.17,0.15} + \definecolor{cellblue}{rgb} {0.17,0.60,0.99} + + \def\inner{10} + \def\innerw{5} + \pgfmathsetmacro{\innera}{\inner+\innerw} + \pgfmathsetmacro{\innerb}{\inner-\innerw} + \def\innerp{15} + \pgfmathsetmacro{\innerc}{90-\innerp} + \pgfmathsetmacro{\innerd}{270-\innerp} + \pgfmathsetmacro{\innere}{90+\innerp} + + \def\outer{20} + \def\outerw{5} + \pgfmathsetmacro{\outera}{\outer+\outerw} + \pgfmathsetmacro{\outerb}{\outer-\outerw} + \def\outerp{10} + \pgfmathsetmacro{\outerc}{180-\outerp} + \pgfmathsetmacro{\outerd}{360-\outerp} + \pgfmathsetmacro{\outere}{180+\outerp} + + % #1: color + % #2: r + % #3: rd + % #4: a1 + % #5: a2 + % #6: ad + % #7 : text 1 + % #8 : text 2 + % #9 : text color + \newcommand{\bigarrow}[9]{ + \fill[x=1mm, y=1mm, color=#1] (#5:#2) -- (#5-#6:#2-#3) arc[start angle=#5-#6, end angle=#4+#6, radius=#2-#3] -- (#4:#2) -- (#4+#6:#2+#3) arc[start angle=#4+#6, end angle=#5-#6, radius=#2+#3]; + + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#7},text align=center, raise=-0.5ex}] (#5:#2) arc[start angle=#5, end angle=#4, radius=#2]; + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#8},text align=center, raise=-0.5ex}] (#4:#2) arc[start angle=#4, end angle=#5, radius=#2]; + } + \newcommand{\bigtoparrow}[9]{ + \fill[x=1mm, y=1mm, color=#1] (#5:#2-#3) arc[start angle=#5, end angle=#4, radius=#2-#3] -- (#4+#6:#2+#3) arc[start angle=#4+#6, end angle=#5-#6, radius=#2+#3]; + + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#7},text align=center, raise=-0.5ex}] (#5:#2) arc[start angle=#5, end angle=#4, radius=#2]; + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#8},text align=center, raise=-0.5ex}] (#4:#2) arc[start angle=#4, end angle=#5, radius=#2]; + } + \newcommand{\bigbottomarrow}[9]{ + \fill[x=1mm, y=1mm, color=#1] (#5-#6:#2-#3) arc[start angle=#5-#6, end angle=#4+#6, radius=#2-#3] -- (#4:#2+#3) arc[start angle=#4, end angle=#5, radius=#2+#3]; + + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#7},text align=center, raise=-0.5ex}] (#5:#2) arc[start angle=#5, end angle=#4, radius=#2]; + \draw [x=1mm, y=1mm, decorate, decoration={text along path, text={|\color{#9}|#8},text align=center, raise=-0.5ex}] (#4:#2) arc[start angle=#4, end angle=#5, radius=#2]; + } + + \tikzexternalenable + \begin{tikzpicture} + \small + \node[x=1mm, y=1mm, anchor=center, minimum width=84mm,minimum height=12mm, inner sep=0,fill=black!10, outer sep=0]() at (14,0) {}; + \node[x=1mm, y=1mm, anchor=west, text width=1cm]() at (30,0) {\textbf{Physical World}}; + \node[x=1mm, y=1mm, anchor=west, text width=1cm]() at (30,10) {\textbf{Mind}}; + \node[x=1mm, y=1mm, anchor=west, text width=1cm]() at (30,-10) {\textbf{Computation}}; + + %\bigbottomarrow{cellblue}{12}{4}{180}{360}{30}{}{System}{white} + %\bigbottomarrow{cellred}{12}{4}{0}{180}{30}{User}{}{white} + %\bigtoparrow{black!30}{20}{4}{-90}{90}{30}{Haptic rendering pipeline}{}{white} + %\bigtoparrow{black!60}{20}{4}{90}{270}{30}{Input pipeline}{}{white} + + \bigarrow{cellblue}{10}{4}{180}{360}{20}{}{System}{white} + \bigarrow{cellred}{10}{4}{0}{180}{20}{User}{}{white} + \bigarrow{black!40}{18}{4}{-90}{90}{20}{Input pipeline}{}{white} + \bigarrow{black!60}{18}{4}{90}{270}{20}{Haptic rendering pipeline}{}{white} + \end{tikzpicture} + \tikzexternaldisable + \caption[Full pipeline.]{Full pipeline.} + \label{fig:all} +\end{figure} + \section{Something} -- 2.30.2