2

I read the question concerning the rubiks cube and that seems fine for my intention. However, i have no real cube shape, but 4 "columns" and 3 "rows" and 3 "steps" in the depth.

Can this Code posted by Max Snippe can easily be modified to achieve this? I am a complete beginner in the 3d Plot and just asked myself it this is an easy modification or too complex? EDIT: And to modify it in a way to stretch other dimensions that the outer shape look like a cube?

Code:

\documentclass[border=5pt,tikz]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d}
\begin{document}
\foreach \myPsi in {90,100,...,170}{
\tdplotsetmaincoords{70}{\myPsi}
\begin{tikzpicture}
    \clip (-8,-6) rectangle (8,6);
    \begin{scope}[tdplot_main_coords]
        \draw[step=2cm,canvas is yz plane at x=4] (-4.01,-4.01) grid (4,4);
        \draw[step=2cm,canvas is xz plane at y=4] (-4.01,-4.01) grid (4,4);
        \draw[step=2cm,canvas is yx plane at z=4] (-4.01,-4.01) grid (4,4);
    \end{scope}
\end{tikzpicture}
}
\end{document}

Many thanks in advance.

SRel
  • 1,313
  • 3
    Yes, of course. You just need to adjust the boundaries: \draw[step=2cm,canvas is yz plane at x=4] (-4cm-\pgflinewidth*1pt,-2cm-\pgflinewidth*1pt) grid (4,4); \draw[step=2cm,canvas is xz plane at y=4] (-4cm-\pgflinewidth*1pt,-2cm-\pgflinewidth*1pt) grid (4,4); \draw[step=2cm,canvas is yx plane at z=4] (-4cm-\pgflinewidth*1pt,-4cm-\pgflinewidth*1pt) grid (4,4);. I do not want to post an answer since I already stole @MaxSnippe's superb code once. I think he deserves at least two accepted answers for this masterpiece. –  Aug 06 '18 at 18:43
  • @marmot please post an answer, I have already had my fair share of fun (and used already way too much time). – Max Aug 07 '18 at 06:44
  • 4
    I'm voting to close this question as solved in comments – samcarter_is_at_topanswers.xyz Sep 13 '18 at 09:41
  • I could also delete it if its fine – SRel Sep 13 '18 at 09:43

0 Answers0