summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/rubik/example-rot2.tex
blob: 688717ffcab1eb9a60ff8e9251b81def8d95bcb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%% example-rot2.tex
%% January 20, 2014
%% RWD Nickalls & A Syropoulos 
%% example file for rubikrotation package
%% Requires TikZ and rubikcube, and rubikrotation packages
%% uses Perl script rubikrotation.pl
%% experiment  by un-commenting  different RubikRotation commands,
%%   and reviewing the .log file for details of rotations performed. 
%%-----------------------------------------------------
%% USAGE:  pdflatex  --shell-escape  example-rot2.tex
%% ----------------------------------------------------
\documentclass[a4paper]{article}
\usepackage{tikz,rubikcube,rubikrotation}
\pagestyle{myheadings}
\markright{\textsc{rubikrotation} package; \hspace{2cm}file = example-rot2.tex}
%%--------------
%% some well known sequences (see the web page of Reid)
\newcommand{\sixT}{*sixT,F2,R2,U2,Fp,B,D2,L2,F,B}
\newcommand{\cubeincube}{*cubeincube,F,L,F,Up,R,U,F2,L2,Up,Lp,B,Dp,Bp,L2,U}
\newcommand{\sixspot}{*sixspot,U,Dp,R,Lp,F,Bp,U,Dp}
\newcommand{\errors}{*errors,U,Dp,RR,Lpp,Fq,Bp,U,Dp,cat}
%================
\begin{document}

\RubikCubeSolved  % sets up a solved cube
%----------------
%\RubikRotation{R,FFF}         %%this will show up the command FFF as being an error
%\RubikRotation{U,D,L,R,F,B}   %% some basic rotations in sequence
%\RubikRotation{U2,D2,L2,R2,F2,B2}  %% makes an interesting pattern
%\RubikRotation{\sixT}         %% generates a T on each face
%\RubikRotation{\cubeincube}   %% generates a cube-in-cube effect
%\RubikRotation{random,67}     %%  makes 67 random rotations
\RubikRotation{x,y,\sixspot}   %% shows a sixspot effect
%\RubikRotation{\errors}     %% sixspot with errors (errors will be shown if using \ShowRobotErrors)

\begin{tikzpicture}
   \DrawRubikCubeFlat      %% shows cube as half cube half flat
   %\DrawRubikFlat         %% shows cube as a flat representation
\end{tikzpicture}
%%--------------
\ShowRubikErrors   %% will show error file underneath the image
\end{document}