0

This question is based on Rubik cube with arrows. I would like to take the cube they've provided and show one face in partial or full rotation. Preferably partial, but full will work. Here's the code that is used:

\begin{tikzpicture}[3d view={55}{25},
    axis/.style={thick,-{Circle[fill=black]}},
    font=\sffamily\bfseries\large,
    rot/.style={ultra thick,-{Stealth[bend]}}]
 \draw[axis] (-3,-1.5,-1.5) -- (-8,-1.5,-1.5)coordinate[pos=0.7] (L) node[pos=1.1]{L};
 \draw[axis] (-1.5,0,-1.5) -- (-1.5,5,-1.5) coordinate[pos=0.7] (B)  node[pos=1.1]{B};
 \draw[axis] (-1.5,-1.5,-3) -- (-1.5,-1.5,-8)coordinate[pos=0.7] (D)  node[pos=1.1]{D};
 \draw[canvas is xz plane at y=-3,fill=green!60!black] (-3,-3) rectangle (0,0);
 \draw[canvas is xz plane at y=-3] (-3,-3) grid (0,0);
 \draw[canvas is yz plane at x=0,fill=red] (-3,-3) rectangle (0,0);
 \draw[canvas is yz plane at x=0] (-3,-3) grid (0,0);
 \draw[canvas is xy plane at z=0,fill=white] (-3,-3) rectangle (0,0);
 \draw[canvas is xy plane at z=0] (-3,-3) grid (0,0);
 \draw[axis] (-1.5,-3,-1.5) -- (-1.5,-8,-1.5)coordinate[pos=0.7] (F) node[pos=1.1]{F};
 \draw[axis] (0,-1.5,-1.5) -- (5,-1.5,-1.5)coordinate[pos=0.7] (R) node[pos=1.1]{R};
 \draw[axis] (-1.5,-1.5,0) -- (-1.5,-1.5,5)coordinate[pos=0.7] (U) node[pos=1.1]{U};
 \begin{scope}[canvas is yz plane at x=0,shift={(L)}]
  \pgflowlevelsynccm
  \draw[,rot] (-120:0.5) arc(-120:120:0.5);
 \end{scope}
 \begin{scope}[canvas is yz plane at x=0,shift={(U)}]
  \pgflowlevelsynccm
  \draw[,rot] (120:0.5) arc(120:-120:0.5);
 \end{scope}
 \begin{scope}[canvas is xz plane at y=0,shift={(F)}]
  \pgflowlevelsynccm
  \draw[,rot] (-120:0.5) arc(-120:120:0.5);
 \end{scope}
 \begin{scope}[canvas is xz plane at y=0,shift={(B)}]
  \pgflowlevelsynccm
  \draw[,rot] (120:0.5) arc(120:-120:0.5);
 \end{scope}
 \begin{scope}[canvas is xy plane at z=0,shift={(D)}]
  \pgflowlevelsynccm
  \draw[,rot] (-120:0.5) arc(-120:120:0.5);
 \end{scope}
 \begin{scope}[canvas is xy plane at z=0,shift={(R)}]
  \pgflowlevelsynccm
  \draw[,rot] (120:0.5) arc(120:-120:0.5);
 \end{scope}
\end{tikzpicture}

Output Image

3
  • Are you still interested in your problem? If "yes", can you say precisely what are you looking for? For example, do you want to draw the cube with the bottom face turned (around the vertical axis) first at 30 degrees and then at 90 degrees? – Daniel N Nov 30 '20 at 9:48
  • You should look at Max's answer at tex.stackexchange.com/questions/444812/… – Daniel N Nov 30 '20 at 14:05
  • @DanielN I'm not still working on this, but I do appreciate Max's answer...this will be very helpful when I get back to this. – Atsina Dec 17 '20 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.