# Slanting a square together with its pattern

I want to draw a cube in which all sides are filled with bricks. My code is based on the slanting of sides but unfortunately bricks remain straight and the figure won't be nice. Here is my code:

\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\draw [pattern=bricks,yslant=-.5](0,0) rectangle (3,3);
\draw [yslant=.5,pattern=bricks](3,-3) rectangle (6,0);
\draw [yslant=.5,xslant=-1,pattern=bricks] (3,0) rectangle (6,3);
\end{tikzpicture}
\end{document}


Is there a way to slant bricks pattern or I have to try another approach?

• You could try to create a new pattern of slanted bricks. Personally I would make a pic of a single brick and place them with a loop. – John Kormylo Aug 6 '17 at 14:48
• something might help. – Symbol 1 Aug 7 '17 at 19:22
• Page 171 of the manual, right at the beginning of the section on patterns states 'Patterns are not overly flexible. In particular, it is not possible to change the size or orientation of a pattern without declaring a new pattern.' – cfr Aug 7 '17 at 22:58
• @crf You're right. It seems I have to try what John and Symbol 1 have suggested. – MEDVIS Aug 8 '17 at 3:43