SHARE
TWEET

invar-blocks.tex

a guest Feb 5th, 2018 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. % invar-blocks.tex
  3. % Generate Invariant Matrix Block Diagrams for GNCS Paper
  4. %
  5. % Base document requires:
  6. %
  7. %    \usepackage{pgf,tikz}
  8. %    \usepackage{mathrsfs}
  9. %    \usetikzlibrary{arrows}
  10. %    \usetikzlibrary[patterns]
  11. %    \usetikzlibrary{decorations.pathreplacing}
  12. %    [import LURC]
  13.  
  14. % One-time-only definitions, etc.
  15. \OneTimeOnly{
  16.     \definecolor{aqaqaq}{rgb}{0.6274509803921569,0.6274509803921569,0.6274509803921569}
  17.     \definecolor{wrwrwr}{rgb}{0.3803921568627451,0.3803921568627451,0.3803921568627451}
  18.     \definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
  19.    
  20.     \newcommand{\XZ}{0.02}
  21.     \newcommand{\XOne}{0.3}
  22.     \newcommand{\XTwo}{0.7}
  23.     \newcommand{\XEnd}{1}
  24.     \newcommand{\XP}{0.5}
  25.     \newcommand{\XPOut}{0.85}
  26.     \newcommand{\XPOff}{0.01}
  27.    
  28.     \newcommand{\XpF}{\XZ/2+\XOne/2}
  29.     \newcommand{\XOpF}{\XOne/2+\XTwo/2}
  30.     \newcommand{\XTpF}{\XTwo/2+\XEnd/2}
  31. }
  32.  
  33. % Common environment and style definitions <---
  34. \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=5cm,y=5cm]
  35.  
  36. \tikzstyle{matrixborder}=[line width=1.6pt]
  37. \tikzstyle{zeroed}=[line width=1.2pt,color=aqaqaq,fill=aqaqaq,pattern=north east lines,pattern color=aqaqaq]
  38. \tikzstyle{ncdivider}=[line width=1.6pt,color=wrwrwr]
  39. \tikzstyle{csdivider}=[line width=0.8pt,dash pattern=on 2pt off 2pt]
  40. \tikzstyle{ssbrace}=[decorate,decoration={brace,amplitude=8pt,mirror},xshift=4pt]
  41. \tikzstyle{ssbracesm}=[decorate,decoration={brace,amplitude=4pt,mirror},xshift=4pt]
  42. \tikzstyle{ssbracemath}=[black,midway,anchor=west,xshift=8pt]
  43. \tikzstyle{Pdivider}=[blue,line width=1.2pt,dash pattern=on 4pt off 2pt]
  44. \tikzstyle{blockoverlay}=[black,fill=white,opacity=0.9,line width=0.8pt,dash pattern=on 2pt off 2pt]
  45. % --->
  46.  
  47. % Generate the 'A' block, which considers P = \Pi_v, and may not be fully reachable.
  48. \OnlyFor{block-A}{
  49.     \fill[zeroed] (\XTwo,\XEnd) -- (\XEnd,\XEnd) -- (\XEnd,\XTwo) -- (\XTwo,\XTwo) -- cycle;
  50.     \fill[zeroed] (\XZ,\XZ) -- (\XZ,\XOne) -- (\XOne,\XOne) -- (\XOne,\XZ) -- cycle;
  51.    
  52.     \draw [matrixborder] (\XZ,\XZ)-- (\XZ,\XEnd);
  53.     \draw [matrixborder] (\XZ,\XEnd)-- (\XEnd,\XEnd);
  54.     \draw [matrixborder] (\XEnd,\XEnd)-- (\XEnd,\XZ);
  55.     \draw [matrixborder] (\XEnd,\XZ)-- (\XZ,\XZ);
  56.    
  57.     \draw [ncdivider] (\XTwo,\XZ)-- (\XTwo,\XEnd);
  58.     \draw [ncdivider] (\XZ,\XOne)-- (\XEnd,\XOne);
  59.    
  60.     \draw [csdivider] (\XZ,\XTwo)-- (\XEnd,\XTwo);
  61.     \draw [csdivider] (\XOne,\XZ)-- (\XOne,\XEnd);
  62.    
  63.     \draw (\XpF,\XTpF)  node[anchor=center] {$G_{11}$};
  64.     \draw (\XOpF,\XTpF) node[anchor=center] {$G_{12}$};
  65.     \draw (\XpF,\XOpF)  node[anchor=center] {$-G^{\dagger}_{12}$};
  66.     \draw (\XOpF,\XOpF) node[anchor=center] {$G_{22}$};
  67.     \draw (\XTpF,\XOpF) node[anchor=center] {$G_{23}$};
  68.     \draw (\XOpF,\XpF)  node[anchor=center] {$-G^{\dagger}_{23}$};
  69.    
  70.     \draw [ssbrace] (\XEnd,\XTwo) -- (\XEnd,\XEnd) node [ssbracemath] {$\Pi_{\mathbf C}$};
  71.     \draw [ssbrace] (\XEnd,\XOne) -- (\XEnd,\XTwo) node [ssbracemath] {$\Pi_v \ominus \Pi_{\mathbf C}$};
  72.     \draw [ssbrace] (\XEnd,\XZ) -- (\XEnd,\XOne) node [ssbracemath] {$\Pi_v^{\perp}$};
  73. }
  74.  
  75. % Generate the 'B' block, which considers an arbitrary P intersecting both \Pi_v and \Pi_v_^\perp, and may not be fully reachable.
  76. \OnlyFor{block-B}{
  77.     \fill [zeroed] (\XP,\XEnd) -- (\XEnd,\XEnd) -- (\XEnd,\XTwo) -- (\XP,\XTwo) -- cycle;
  78.     \fill [zeroed] (\XZ,\XZ) -- (\XZ,\XP) -- (\XOne,\XP) -- (\XOne,\XZ) -- cycle;
  79.    
  80.     \draw [Pdivider] (\XZ+\XPOff,\XP) -- (\XZ+\XPOff,\XEnd-\XPOff) -- (\XP,\XEnd-\XPOff) -- (\XP,\XP) -- cycle;
  81.     \draw [Pdivider] (\XZ+\XPOff,1-\XPOut) -- (\XZ+\XPOff,\XOne-\XPOff) -- (\XTwo+\XPOff,\XOne-\XPOff) -- (\XTwo+\XPOff,\XEnd-\XPOff) -- (\XPOut,\XEnd-\XPOff) -- (\XPOut,1-\XPOut) -- cycle;
  82.    
  83.     \filldraw [blockoverlay] (\XP,\XP) -- (\XP,\XTwo) -- (\XEnd,\XTwo) -- (\XEnd,\XP) -- cycle;
  84.     \filldraw [blockoverlay] (\XOne,\XZ) -- (\XOne,\XP) -- (\XP,\XP) -- (\XP,\XZ) -- cycle;
  85.    
  86.     \draw [matrixborder] (\XZ,\XZ)-- (\XZ,\XEnd);
  87.     \draw [matrixborder] (\XZ,\XEnd)-- (\XEnd,\XEnd);
  88.     \draw [matrixborder] (\XEnd,\XEnd)-- (\XEnd,\XZ);
  89.     \draw [matrixborder] (\XEnd,\XZ)-- (\XZ,\XZ);
  90.    
  91.     \draw [ncdivider] (\XTwo,\XZ)-- (\XTwo,\XP);
  92.     \draw [ncdivider] (\XTwo,\XTwo)-- (\XTwo,\XEnd);
  93.     \draw [ncdivider] (\XZ,\XOne)-- (\XOne,\XOne);
  94.     \draw [ncdivider] (\XP,\XOne)-- (\XEnd,\XOne);
  95.    
  96.     \draw [csdivider] (\XZ,\XTwo)-- (\XEnd,\XTwo);
  97.     \draw [csdivider] (\XOne,\XZ)-- (\XOne,\XEnd);
  98.    
  99.     \draw [ssbracesm] (\XEnd,\XTwo) -- (\XEnd,\XEnd) node [ssbracemath] {$\Pi_{\mathbf C}$};
  100.     \draw [ssbracesm] (\XEnd,\XP) -- (\XEnd,\XTwo) node [ssbracemath] {$P\cap \Pi_v \ominus \Pi_{\mathbf C}$};
  101.     \draw [ssbracesm] (\XEnd,\XOne) -- (\XEnd,\XP) node [ssbracemath] {$P^{\perp}\cap \Pi_v$};
  102.     \draw [ssbracesm] (\XEnd,1-\XPOut) -- (\XEnd,\XOne) node [ssbracemath] {$P \cap \Pi_v^{\perp}$};
  103.     \draw [ssbracesm] (\XEnd,\XZ) -- (\XEnd,1-\XPOut) node [ssbracemath] {$P^{\perp} \cap \Pi_v^{\perp}$};
  104.    
  105.     \draw (\XpF,\XTpF)  node[anchor=center] {$G_{11}$};
  106.     \draw (\XOne/2+\XP/2,\XTpF)  node[anchor=center] {$G_{12}$};
  107.     \draw (\XpF,\XTwo/2+\XP/2)  node[anchor=center] {$-G_{12}^\dagger$};
  108.     \draw (\XOne/2+\XP/2,\XTwo/2+\XP/2)  node[anchor=center] {$G_{22}$};
  109.     \draw (\XP/2+\XEnd/2,\XTwo/2+\XP/2)  node[anchor=center] {$G_{23}$};
  110.     \draw (\XOne/2+\XP/2,\XZ/2+\XP/2)  node[anchor=center] {$-G_{23}^\dagger$};
  111. }
  112.  
  113. % Generate the 'C' block, which considers a canonical P, which intersects only \Pi_v and is fully reachable.
  114. \OnlyFor{block-C}{
  115.     \fill [zeroed] (\XP,\XEnd) -- (\XEnd,\XEnd) -- (\XEnd,\XP) -- (\XP,\XP) -- cycle;
  116.     \fill [zeroed] (\XZ,\XZ) -- (\XZ,\XP) -- (\XP,\XP) -- (\XP,\XZ) -- cycle;
  117.    
  118.     \draw [Pdivider] (\XZ+\XPOff,\XP) -- (\XZ+\XPOff,\XEnd-\XPOff) -- (\XP,\XEnd-\XPOff) -- (\XP,\XP) -- cycle;
  119.     \draw [Pdivider] (\XP,\XZ+\XPOff) -- (\XP,\XP) -- (\XEnd-\XPOff,\XP) -- (\XEnd-\XPOff,\XZ+\XPOff) -- cycle;
  120.    
  121.     \draw [matrixborder] (\XZ,\XZ)-- (\XZ,\XEnd);
  122.     \draw [matrixborder] (\XZ,\XEnd)-- (\XEnd,\XEnd);
  123.     \draw [matrixborder] (\XEnd,\XEnd)-- (\XEnd,\XZ);
  124.     \draw [matrixborder] (\XEnd,\XZ)-- (\XZ,\XZ);
  125.    
  126.     \draw [ncdivider] (\XTwo,\XZ)-- (\XTwo,\XEnd);
  127.     \draw [ncdivider] (\XZ,\XOne)-- (\XEnd,\XOne);
  128.    
  129.     \draw [csdivider] (\XZ,\XTwo)-- (\XEnd,\XTwo);
  130.     \draw [csdivider] (\XOne,\XZ)-- (\XOne,\XEnd);
  131.    
  132.     \draw [ssbrace] (\XEnd,\XP) -- (\XEnd,\XEnd) node [ssbracemath] {$P$};
  133.     \draw [ssbrace] (\XEnd,\XZ) -- (\XEnd,\XP) node [ssbracemath] {$P^{\perp}$};
  134. }
  135.  
  136. % Common footer <---
  137. \end{tikzpicture}
  138. % --->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top