SHARE
TWEET

Untitled

a guest Jun 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. documentclass[border=5mm]{standalone}
  2.  
  3. usepackage{tikz}
  4. usetikzlibrary{calc}
  5. usepackage{pgfplots}
  6. pgfplotsset{compat=1.13}
  7.  
  8. newcommand{newvar}{pgfmathsetmacro}
  9.  
  10. begin{document}
  11.  
  12. begin{tikzpicture}[scale=1, transform shape]%, transparency group, blend mode = multiply]
  13.     newvar{num}{10}
  14.     newvar{val}{num-1}
  15.     newvar{scale}{1}
  16.  
  17.     tikzset{
  18.         square/.pic={
  19.         draw[line width=1mm, pic actions]  (0, 0) -- (1, 0) -- (1, 1) -- (0, 1) -- cycle;
  20.     }
  21.     }
  22.     tikzset{
  23.         scaledc/.pic={
  24.         foreach i in {(0, 0), (scale, 0), (0, scale), (0, 2*scale), (scale, 2*scale)}{
  25.         draw[line width=1mm] i pic[fill=blue] {square};
  26.         }
  27.     }
  28.     }
  29.  
  30.     tikzset{
  31.     scaledd/.pic={
  32.         foreach i in {(0, 0), (-1*scale, 0), (0, -1*scale), (0, -2*scale), (-1*scale, -2*scale)}{
  33.         draw[line width=1mm] i pic[fill=red] {square};
  34.         }
  35.     }
  36.     }
  37.  
  38. %    path (0, 0) pic {scaledd};
  39.  
  40.     tikzset{
  41.     tile1/.pic={
  42.         foreach i in {(A), (B), (C), (D), (E)}{
  43.             draw i pic {square} ;
  44.         }
  45.     }
  46.     }
  47.  
  48.     begin{scope}[transparency group]
  49.     begin{scope}[blend mode = multiply]
  50.         foreach i in {0,...,num}{
  51.         foreach j in {0,...,val}{
  52.             path (3*j+i, -j+3*i) pic {scaledc};
  53.             path (3*j+i+2, -j+3*i+1) pic {scaledd};
  54.         }
  55.         }
  56.     end{scope}
  57.     end{scope}
  58. end{tikzpicture}
  59.  
  60. end{document}
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