Guest User

Untitled

a guest
May 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. documentclass[tikz,border=3.14pt]{standalone}
  2. usetikzlibrary{3d}
  3. newcommand{FakeBox}[5][]{
  4. draw[gray,ultra thin,fill=#1] #2 --++ (-#3,0,0) --++ (0,-#4,0) --++ (#3,0,0) -- cycle;
  5. draw[gray,ultra thin,fill=#1] #2 --++ (-#3,0,0) --++ (0,0,#5) --++ (#3,0,0) -- cycle;
  6. draw[gray,ultra thin,fill=#1!40!black] #2 --++ (0,0,#5) --++ (0,-#4,0) --++ (0,0,-#5) -- cycle;
  7. }
  8. begin{document}
  9.  
  10. begin{tikzpicture}[x={(1,0)},y={(0,1)},z={({cos(60)},{sin(60)})}]
  11.  
  12. % yz plane
  13. draw[canvas is yz plane at x = 0, transform shape, draw = red, fill = red!50,
  14. opacity = 0.5] (0,0) rectangle (3,3);
  15. foreach Col/X in {green/1,green/2,green/3,red/4}
  16. {FakeBox[Col]{(X,0,4)}{0.2}{2}{1}}
  17. end{tikzpicture}
  18. end{document}
Add Comment
Please, Sign In to add comment