Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[tikz,border=3.14pt]{standalone}
- usetikzlibrary{3d}
- newcommand{FakeBox}[5][]{
- draw[gray,ultra thin,fill=#1] #2 --++ (-#3,0,0) --++ (0,-#4,0) --++ (#3,0,0) -- cycle;
- draw[gray,ultra thin,fill=#1] #2 --++ (-#3,0,0) --++ (0,0,#5) --++ (#3,0,0) -- cycle;
- draw[gray,ultra thin,fill=#1!40!black] #2 --++ (0,0,#5) --++ (0,-#4,0) --++ (0,0,-#5) -- cycle;
- }
- begin{document}
- begin{tikzpicture}[x={(1,0)},y={(0,1)},z={({cos(60)},{sin(60)})}]
- % yz plane
- draw[canvas is yz plane at x = 0, transform shape, draw = red, fill = red!50,
- opacity = 0.5] (0,0) rectangle (3,3);
- foreach Col/X in {green/1,green/2,green/3,red/4}
- {FakeBox[Col]{(X,0,4)}{0.2}{2}{1}}
- end{tikzpicture}
- end{document}
Add Comment
Please, Sign In to add comment