From 56864a978f93ea1c29086183c24fb535c4022270 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 6 Feb 2014 23:27:03 +0000 Subject: rubik (4feb14) git-svn-id: svn://tug.org/texlive/trunk@32893 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/rubik/rubikcube.sty | 1860 ++++++++++++++++++++ .../texmf-dist/tex/latex/rubik/rubikrotation.sty | 160 ++ 2 files changed, 2020 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/rubik/rubikcube.sty create mode 100644 Master/texmf-dist/tex/latex/rubik/rubikrotation.sty (limited to 'Master/texmf-dist/tex/latex/rubik') diff --git a/Master/texmf-dist/tex/latex/rubik/rubikcube.sty b/Master/texmf-dist/tex/latex/rubik/rubikcube.sty new file mode 100644 index 00000000000..0737dc74aca --- /dev/null +++ b/Master/texmf-dist/tex/latex/rubik/rubikcube.sty @@ -0,0 +1,1860 @@ +%% +%% This is file `rubikcube.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% rubikcube.dtx (with options: `rubikcube') +%% +%% ----------------------------------------------------------------- +%% Authors: RWD Nickalls (dick@nickalls.org) +%% and Apostolos Syropoulos (asyropoulos@yahoo.com) +%% +%% Copyright 2014 RWD Nickalls and A Syropoulos +%% +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any +%% later version: +%% +%% This work consists of the files listed in the README file. +%% ----------------------------------------------------------------- +%% +%% This is a LaTeX/TikZ package for drawing Rubik cubes +%% Please report errors or suggestions for improvement to +%% +%% RWD Nickalls (dick@nickalls.org) +%% Apostolos Syropoulos (asyropoulos@yahoo.com) +%% +%% This package requires the basic TikZ package to be loaded already +%% ------------------------------------------------------------------ +%% rubikcube.dtx +%% Copyright 2014 RWD Nickalls (dick@nickalls.org) and A Syropoulos (asyropoulos@yahoo.com) +%%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + +\def\RCfileversion{2.0}% +\def\RCfiledate{2014/01/20}% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{rubikcube}[\RCfiledate\space (v\RCfileversion)] +\@ifpackageloaded{tikz}{}{% + \typeout{---rubikcube requires the TikZ package.}% + \RequirePackage{tikz}}% +\newcommand{\rubikcube}{\textsf{rubikcube}}% +\newcommand{\@rr}[1]{\textbf{\textsf{#1}}} +\newcommand{\@rrp}[1]{\textbf{\textsf{#1}$^\prime$}} +\newcommand{\@rrw}[1]{\textbf{\textsf{#1\footnotesize{w}}}} +\newcommand{\@rrwp}[1]{\textbf{\textsf{#1\footnotesize{w}}$^\prime$}} +\newcommand{\@rrs}[1]{\textbf{\textsf{#1\footnotesize{s}}}} +\newcommand{\@rrsp}[1]{\textbf{\textsf{#1\footnotesize{s}}$^\prime$}} +\newcommand{\@rra}[1]{\textbf{\textsf{#1\footnotesize{a}}}} +\newcommand{\@rrap}[1]{\textbf{\textsf{#1\footnotesize{a}}$^\prime$}} +\newcommand{\@xyzh}[1]{\textbf{[\textsf{#1}]}\,} +\newcommand{\@xyzhp}[1]{\textbf{[\textsf{#1}$^\prime$]}\,} +\newcommand{\@xyzRubik}[1]{\raisebox{3.45pt}{\textbf{[\textsf{#1}]}}} +\newcommand{\@xyzRubikp}[1]{\raisebox{3.45pt}{\textbf{[\textsf{#1}$^\prime$]}}} +\newcommand{\@SquareLetter}[1]{\setlength\fboxsep{2.5pt}\fboxrule=0.8pt% + \fbox{\rule[-1pt]{0pt}{8.5pt}\raisebox{-0.5pt}{#1}}} +\newlength\@hRubik% +\setlength{\@hRubik}{0.185cm}% +\definecolor{R}{HTML}{C41E33}% +\definecolor{G}{HTML}{00BE38}% +\definecolor{B}{HTML}{0051BA}% +\definecolor{Y}{HTML}{FFFF00}% +\colorlet{X}{black!30}% grey +\colorlet{O}{orange}% +\colorlet{W}{white}% +\newcommand{\RubikFaceUp}[9]{% +\def\Ult{#1}\def\Umt{#2}\def\Urt{#3}% +\def\Ulm{#4}\def\Umm{#5}\def\Urm{#6}% +\def\Ulb{#7}\def\Umb{#8}\def\Urb{#9}% +} +\newcommand{\RubikFaceFront}[9]{% +\def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% +\def\Flm{#4}\def\Fmm{#5}\def\Frm{#6}% +\def\Flb{#7}\def\Fmb{#8}\def\Frb{#9}% +} +\newcommand{\RubikFaceRight}[9]{% +\def\Rlt{#1}\def\Rmt{#2}\def\Rrt{#3}% +\def\Rlm{#4}\def\Rmm{#5}\def\Rrm{#6}% +\def\Rlb{#7}\def\Rmb{#8}\def\Rrb{#9}% +} +\newcommand{\RubikFaceDown}[9]{% +\def\Dlt{#1}\def\Dmt{#2}\def\Drt{#3}% +\def\Dlm{#4}\def\Dmm{#5}\def\Drm{#6}% +\def\Dlb{#7}\def\Dmb{#8}\def\Drb{#9}% +} +\newcommand{\RubikFaceLeft}[9]{% +\def\Llt{#1}\def\Lmt{#2}\def\Lrt{#3}% +\def\Llm{#4}\def\Lmm{#5}\def\Lrm{#6}% +\def\Llb{#7}\def\Lmb{#8}\def\Lrb{#9}% +} +\newcommand{\RubikFaceBack}[9]{% +\def\Blt{#1}\def\Bmt{#2}\def\Brt{#3}% +\def\Blm{#4}\def\Bmm{#5}\def\Brm{#6}% +\def\Blb{#7}\def\Bmb{#8}\def\Brb{#9}% +} +\newcommand{\RubikFaceUpAll}[1]{% +\def\Ult{#1}\def\Umt{#1}\def\Urt{#1}% +\def\Ulm{#1}\def\Umm{#1}\def\Urm{#1}% +\def\Ulb{#1}\def\Umb{#1}\def\Urb{#1}% +} +\newcommand{\RubikFaceFrontAll}[1]{% +\def\Flt{#1}\def\Fmt{#1}\def\Frt{#1}% +\def\Flm{#1}\def\Fmm{#1}\def\Frm{#1}% +\def\Flb{#1}\def\Fmb{#1}\def\Frb{#1}% +} +\newcommand{\RubikFaceRightAll}[1]{% +\def\Rlt{#1}\def\Rmt{#1}\def\Rrt{#1}% +\def\Rlm{#1}\def\Rmm{#1}\def\Rrm{#1}% +\def\Rlb{#1}\def\Rmb{#1}\def\Rrb{#1}% +} +\newcommand{\RubikFaceLeftAll}[1]{% +\def\Llt{#1}\def\Lmt{#1}\def\Lrt{#1}% +\def\Llm{#1}\def\Lmm{#1}\def\Lrm{#1}% +\def\Llb{#1}\def\Lmb{#1}\def\Lrb{#1}% +} +\newcommand{\RubikFaceDownAll}[1]{% +\def\Dlt{#1}\def\Dmt{#1}\def\Drt{#1}% +\def\Dlm{#1}\def\Dmm{#1}\def\Drm{#1}% +\def\Dlb{#1}\def\Dmb{#1}\def\Drb{#1}% +} +\newcommand{\RubikFaceBackAll}[1]{% +\def\Blt{#1}\def\Bmt{#1}\def\Brt{#1}% +\def\Blm{#1}\def\Bmm{#1}\def\Brm{#1}% +\def\Blb{#1}\def\Bmb{#1}\def\Brb{#1}% +} +\RubikFaceUpAll{X}% +\RubikFaceDownAll{X}% +\RubikFaceLeftAll{X}% +\RubikFaceRightAll{X}% +\RubikFaceFrontAll{X}% +\RubikFaceBackAll{X}% +\newcommand{\RubikCubeSolved}{% + \RubikFaceUpAll{W}% + \RubikFaceDownAll{Y}% + \RubikFaceLeftAll{B}% + \RubikFaceRightAll{G}% + \RubikFaceFrontAll{O}% + \RubikFaceBackAll{R}% +} +\newcommand{\RubikSliceTopR}[6]{% +\def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% +\def\Rlt{#4}\def\Rmt{#5}\def\Rrt{#6}% +} +\newcommand{\RubikSliceTopL}[6]{% +\def\Llt{#1}\def\Lmt{#2}\def\Lrt{#3}% +\def\Flt{#4}\def\Fmt{#5}\def\Frt{#6}% +} +\newcommand{\RubikSliceEquatorR}[6]{% +\def\Flm{#1}\def\Fmm{#2}\def\Frm{#3}% +\def\Rlm{#4}\def\Rmm{#5}\def\Rrm{#6}% +} +\newcommand{\RubikSliceEquatorL}[6]{% +\def\Llm{#1}\def\Lmm{#2}\def\Lrm{#3}% +\def\Flm{#4}\def\Fmm{#5}\def\Frm{#6}% +} +\newcommand{\RubikSliceBottomR}[6]{% +\def\Flb{#1}\def\Fmb{#2}\def\Frb{#3}% +\def\Rlb{#4}\def\Rmb{#5}\def\Rrb{#6}% +} +\newcommand{\RubikSliceBottomL}[6]{% +\def\Llb{#1}\def\Lmb{#2}\def\Lrb{#3}% +\def\Flb{#4}\def\Fmb{#5}\def\Frb{#6}% +} +\newcommand{\DrawRubikCubeFrontFace}{% +\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% +(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Fmt]% +(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% +(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Flm]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Fmm]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Frm]% +(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Fmb]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% +(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; +} +\newcommand{\DrawRubikCubeRU}{% +\DrawRubikCubeFrontFace %% frontface +%%-----------Up face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(0.66,3.66) -- (1,4) -- (2,4) -- (1.66,3.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% +(1.66,3.66) -- (2,4) -- (3,4) -- (2.66,3.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(2.66,3.66) -- (3,4) -- (4,4) -- (3.66,3.66) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% +(0.33,3.33) -- (0.66,3.66) -- (1.66,3.66) -- (1.33,3.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% +(1.33,3.33) -- (1.66,3.66) -- (2.66,3.66) -- (2.33,3.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% +(2.33,3.33) -- (2.66,3.66) -- (3.66,3.66) -- (3.33,3.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(0,3) -- (0.33,3.33) -- (1.33,3.33) -- (1,3) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% +(1,3) -- (1.33,3.33) -- (2.33,3.33) -- (2,3) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(2,3) -- (2.33,3.33) -- (3.33,3.33) -- (3,3) -- cycle; +%%-----------Right face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(3,2) -- (3, 3) -- (3.33,3.33) -- (3.33,2.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% +(3.33,2.33) -- (3.33, 3.33) -- (3.66,3.66) -- (3.66,2.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(3.66,2.66) -- (3.66, 3.66) -- (4,4) -- (4,3) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% +(3,1) -- (3, 2) -- (3.33,2.33) -- (3.33,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% +(3.33,1.33) -- (3.33, 2.33) -- (3.66,2.66) -- (3.66,1.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% +(3.66,1.66) -- (3.66, 2.66) -- (4,3) -- (4,2) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(3,0) -- (3, 1) -- (3.33,1.33) -- (3.33,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% +(3.33,0.33) -- (3.33, 1.33) -- (3.66,1.66) -- (3.66,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(3.66,0.66) -- (3.66, 1.66) -- (4,2) -- (4,1) -- cycle; +} +\newcommand{\DrawRubikCube}{\DrawRubikCubeRU} +\newcommand{\DrawRubikCubeRD}{% +\DrawRubikCubeFrontFace %% frontface +%%----------Right face-------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(3,2) -- (3, 3) -- (3.33,2.66) -- (3.33,1.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% +(3.33,1.66) -- (3.33, 2.66) -- (3.66,2.33) -- (3.66,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(3.66,1.33) -- (3.66, 2.33) -- (4,2) -- (4,1) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% +(3,1) -- (3, 2) -- (3.33,1.66) -- (3.33,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% +(3.33,0.66) -- (3.33, 1.66) -- (3.66,1.33) -- (3.66,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% +(3.66,0.33) -- (3.66, 1.33) -- (4,1) -- (4,0) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(3,0) -- (3, 1) -- (3.33,0.66) -- (3.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% +(3.33,-0.33) -- (3.33, 0.66) -- (3.66,0.33) -- (3.66,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(3.66,-0.66) -- (3.66, 0.33) -- (4,0) -- (4,-1) -- cycle; +%%-----------Down face--------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(0.33,-0.33) -- (0, 0) -- (1,0) -- (1.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% +(1.33,-0.33) -- (1, 0) -- (2,0) -- (2.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(2.33,-0.33) -- (2, 0) -- (3,0) -- (3.33,-0.33) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% +(0.66,-0.66) -- (0.33, -0.33) -- (1.33,-0.33) -- (1.66,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% +(1.66,-0.66) -- (1.33, -0.33) -- (2.33,-0.33) -- (2.66,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% +(2.66,-0.66) -- (2.33, -0.33) -- (3.33,-0.33) -- (3.66,-0.66) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(1,-1) -- (0.66, -0.66) -- (1.66,-0.66) -- (2,-1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% +(2,-1) -- (1.66, -0.66) -- (2.66,-0.66) -- (3,-1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(3,-1) -- (2.66, -0.66) -- (3.66,-0.66) -- (4,-1) -- cycle; +} +\newcommand{\DrawRubikCubeLD}{% +\DrawRubikCubeFrontFace %% frontface +%%------------Left face-------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(-1,1) -- (-1, 2) -- (-0.66,2.33) -- (-0.66,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% +(-0.66,1.33) -- (-0.66, 2.33) -- (-0.33,2.66) -- (-0.33,1.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(-0.33,1.66) -- (-0.33, 2.66) -- (0,3) -- (0,2) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% +(-1,0) -- (-1, 1) -- (-0.66,1.33) -- (-0.66,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% +(-0.66,0.33) -- (-0.66, 1.33) -- (-0.33,1.66) -- (-0.33,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% +(-0.33,0.66) -- (-0.33, 1.66) -- (0,2) -- (0,1) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(-1,-1) -- (-1, 0) -- (-0.66,0.33) -- (-0.66,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% +(-0.66,-0.66) -- (-0.66, 0.33) -- (-0.33,0.66) -- (-0.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(-0.33,-0.33) -- (-0.33, 0.66) -- (0,1) -- (0,0) -- cycle; +%%------------Down face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(-0.33,-0.33) -- (0, 0) -- (1,0) -- (0.66,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% +(0.66,-0.33) -- (1, 0) -- (2,0) -- (1.66,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(1.66,-0.33) -- (2, 0) -- (3,0) -- (2.66,-0.33) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% +(-0.66,-0.66) -- (-0.33, -0.33) -- (0.66,-0.33) -- (0.33,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% +(0.33,-0.66) -- (0.66, -0.33) -- (1.66,-0.33) -- (1.33,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% +(1.33,-0.66) -- (1.66, -0.33) -- (2.66,-0.33) -- (2.33,-0.66) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(-1,-1) -- (-0.66, -0.66) -- (0.33,-0.66) -- (0,-1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% +(0,-1) -- (0.33, -0.66) -- (1.33,-0.66) -- (1,-1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(1,-1) -- (1.33, -0.66) -- (2.33,-0.66) -- (2,-1) -- cycle; +} +\newcommand{\DrawRubikCubeLU}{% +\DrawRubikCubeFrontFace %% frontface +%%-----------Left face----------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(-1,3) -- (-1, 4) -- (-0.66,3.66) -- (-0.66,2.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% +(-0.66,2.66) -- (-0.66, 3.66) -- (-0.33,3.33) -- (-0.33,2.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(-0.33,2.33) -- (-0.33, 3.33) -- (0,3) -- (0,2) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% +(-1,2) -- (-1, 3) -- (-0.66,2.66) -- (-0.66,1.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% +(-0.66,1.66) -- (-0.66, 2.66) -- (-0.33,2.33) -- (-0.33,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% +(-0.33,1.33) -- (-0.33, 2.33) -- (0,2) -- (0,1) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(-1,1) -- (-1, 2) -- (-0.66,1.66) -- (-0.66,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% +(-0.66,0.66) -- (-0.66, 1.66) -- (-0.33,1.33) -- (-0.33,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(-0.33,0.33) -- (-0.33, 1.33) -- (0,1) -- (0,0) -- cycle; +%%-----------Up face--------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(-0.66,3.66) -- (-1, 4) -- (0,4) -- (0.33,3.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% +(0.33,3.66) -- (0, 4) -- (1,4) -- (1.33,3.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(1.33,3.66) -- (1, 4) -- (2,4) -- (2.33,3.66) -- cycle; +%%---middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% +(-0.33,3.33) -- (-0.66, 3.66) -- (0.33,3.66) -- (0.66,3.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% +(0.66,3.33) -- (0.33, 3.66) -- (1.33,3.66) -- (1.66,3.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% +(1.66,3.33) -- (1.33, 3.66) -- (2.33,3.66) -- (2.66,3.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(0,3) -- (-0.33, 3.33) -- (0.66,3.33) -- (1,3) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% +(1,3) -- (0.66, 3.33) -- (1.66,3.33) -- (2,3) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(2,3) -- (1.66, 3.33) -- (2.66,3.33) -- (3,3) -- cycle;% +\ %%trailing space +} +\newcommand{\DrawRubikLayerFace}[9]{% +%%-----------FRONT face--------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#2]% +(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#3]% +(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=#4]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#5]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#6]% +(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=#7]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#8]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#9]% +(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; +} +\newcommand{\DrawRubikLayerFaceAll}[1]{% +%%----------FRONT face----------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=#1]% +(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; +} +\newcommand{\FlatUp}[2]{% +\pgfmathsetmacro{\ux}{#1}% +\pgfmathsetmacro{\uy}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(\ux + 0,\uy + 2) -- (\ux + 0,\uy + 3) -- (\ux + 1,\uy + 3)% + -- (\ux + 1,\uy + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% +(\ux + 1,\uy + 2) -- (\ux + 1,\uy + 3) -- (\ux + 2,\uy + 3)% + -- (\ux + 2,\uy + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(\ux + 2,\uy + 2) -- (\ux + 2,\uy + 3) -- (\ux + 3,\uy + 3)% + -- (\ux + 3,\uy + 2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% +(\ux + 0,\uy + 1) -- (\ux + 0,\uy + 2) -- (\ux + 1,\uy + 2)% + -- (\ux + 1,\uy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% +(\ux + 1,\uy + 1) -- (\ux + 1,\uy + 2) -- (\ux + 2,\uy + 2)% + -- (\ux + 2,\uy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% +(\ux + 2,\uy + 1) -- (\ux + 2,\uy + 2) -- (\ux + 3,\uy + 2)% + -- (\ux + 3,\uy + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(\ux + 0,\uy + 0) -- (\ux + 0,\uy + 1) -- (\ux + 1,\uy + 1)% + -- (\ux + 1,\uy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% +(\ux + 1,\uy + 0) -- (\ux + 1,\uy + 1) -- (\ux + 2,\uy + 1)% + -- (\ux + 2,\uy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(\ux + 2,\uy + 0) -- (\ux + 2,\uy + 1) -- (\ux + 3,\uy + 1)% + -- (\ux + 3,\uy + 0) -- cycle; +} +%%------------------------- +\newcommand{\FlatDown}[2]{% +\pgfmathsetmacro{\ddx}{#1}% +\pgfmathsetmacro{\ddy}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(\ddx + 0,\ddy + 2) -- (\ddx + 0,\ddy + 3) -- (\ddx + 1,\ddy + 3)% + -- (\ddx + 1,\ddy + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% +(\ddx + 1,\ddy + 2) -- (\ddx + 1,\ddy + 3) -- (\ddx + 2,\ddy + 3)% + -- (\ddx + 2,\ddy + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(\ddx + 2,\ddy + 2) -- (\ddx + 2,\ddy + 3) -- (\ddx + 3,\ddy + 3)% + -- (\ddx + 3,\ddy + 2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% +(\ddx + 0,\ddy + 1) -- (\ddx + 0,\ddy + 2) -- (\ddx + 1,\ddy + 2)% + -- (\ddx + 1,\ddy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% +(\ddx + 1,\ddy + 1) -- (\ddx + 1,\ddy + 2) -- (\ddx + 2,\ddy + 2)% + -- (\ddx + 2,\ddy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% +(\ddx + 2,\ddy + 1) -- (\ddx + 2,\ddy + 2) -- (\ddx + 3,\ddy + 2)% + -- (\ddx + 3,\ddy + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(\ddx + 0,\ddy + 0) -- (\ddx + 0,\ddy + 1) -- (\ddx + 1,\ddy + 1)% + -- (\ddx + 1,\ddy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% +(\ddx + 1,\ddy + 0) -- (\ddx + 1,\ddy + 1) -- (\ddx + 2,\ddy + 1)% + -- (\ddx + 2,\ddy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(\ddx + 2,\ddy + 0) -- (\ddx + 2,\ddy + 1) -- (\ddx + 3,\ddy + 1)% + -- (\ddx + 3,\ddy + 0) -- cycle; +} +%%----------------------- +\newcommand{\FlatFront}{% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% +(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Fmt]% +(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% +(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Flm]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Fmm]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Frm]% +(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Fmb]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% +(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; +} +%%------------------------- +\newcommand{\FlatBack}[2]{% +\pgfmathsetmacro{\bx}{#1}% +\pgfmathsetmacro{\by}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Blt]% +(\bx + 0,\by + 2) -- (\bx + 0,\by + 3) -- (\bx + 1,\by + 3)% + -- (\bx + 1,\by + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Bmt]% +(\bx + 1,\by + 2) -- (\bx + 1,\by + 3) -- (\bx + 2,\by + 3)% + -- (\bx + 2,\by + 2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Brt]% +(\bx + 2,\by + 2) -- (\bx + 2,\by + 3) -- (\bx + 3,\by + 3)% + -- (\bx + 3,\by + 2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Blm]% +(\bx + 0,\by + 1) -- (\bx + 0,\by + 2) -- (\bx + 1,\by + 2)% + -- (\bx + 1,\by + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Bmm]% +(\bx + 1,\by + 1) -- (\bx + 1,\by + 2) -- (\bx + 2,\by + 2)% + -- (\bx + 2,\by + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Brm]% +(\bx + 2,\by + 1) -- (\bx + 2,\by + 2) -- (\bx + 3,\by + 2)% + -- (\bx + 3,\by + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Blb]% +(\bx + 0,\by + 0) -- (\bx + 0,\by + 1) -- (\bx + 1,\by + 1)% + -- (\bx + 1,\by + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Bmb]% +(\bx + 1,\by + 0) -- (\bx + 1,\by + 1) -- (\bx + 2,\by + 1)% + -- (\bx + 2,\by + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Brb]% +(\bx + 2,\by + 0) -- (\bx + 2,\by + 1) -- (\bx + 3,\by + 1)% + -- (\bx + 3,\by + 0) -- cycle; +} +%%------------------------- +\newcommand{\FlatLeft}[2]{% +\pgfmathsetmacro{\lx}{#1}% +\pgfmathsetmacro{\ly}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(\lx + 0,2) -- (\lx + 0, 3) -- (\lx + 1,3) -- (\lx + 1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% +(\lx + 1,2) -- (\lx + 1, 3) -- (\lx + 2,3) -- (\lx + 2,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(\lx + 2,2) -- (\lx + 2, 3) -- (\lx + 3,3) -- (\lx + 3,2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% +(\lx + 0,1) -- (\lx + 0, 2) -- (\lx + 1,2) -- (\lx + 1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% +(\lx + 1,1) -- (\lx + 1, 2) -- (\lx + 2,2) -- (\lx + 2,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% +(\lx + 2,1) -- (\lx + 2, 2) -- (\lx + 3,2) -- (\lx + 3,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(\lx + 0,0) -- (\lx + 0, 1) -- (\lx + 1,1) -- (\lx + 1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% +(\lx + 1,0) -- (\lx + 1, 1) -- (\lx + 2,1) -- (\lx + 2,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(\lx + 2,0) -- (\lx + 2, 1) -- (\lx + 3,1) -- (\lx + 3,0) -- cycle; +} +%%-------------------------- +\newcommand{\FlatRight}[2]{% +\pgfmathsetmacro{\rx}{#1}% %3 +\pgfmathsetmacro{\ry}{#2}% %0 +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(\rx + 0,2) -- (\rx + 0, 3) -- (\rx + 1,3) -- (\rx + 1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% +(\rx + 1,2) -- (\rx + 1, 3) -- (\rx + 2,3) -- (\rx + 2,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(\rx + 2,2) -- (\rx + 2, 3) -- (\rx + 3,3) -- (\rx + 3,2) -- cycle; +%%-----middle row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% +(\rx + 0,1) -- (\rx + 0, 2) -- (\rx + 1,2) -- (\rx + 1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% +(\rx + 1,1) -- (\rx + 1, 2) -- (\rx + 2,2) -- (\rx + 2,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% +(\rx + 2,1) -- (\rx + 2, 2) -- (\rx + 3,2) -- (\rx + 3,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(\rx + 0,0) -- (\rx + 0, 1) -- (\rx + 1,1) -- (\rx + 1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% +(\rx + 1,0) -- (\rx + 1, 1) -- (\rx + 2,1) -- (\rx + 2,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(\rx + 2,0) -- (\rx + 2, 1) -- (\rx + 3,1) -- (\rx + 3,0) -- cycle; +} +\newcommand{\DrawRubikFlat}{% + \FlatUp{0}{3}% + \FlatDown{0}{-3}% + \FlatLeft{-3}{0}% + \FlatFront% + \FlatRight{3}{0}% + \FlatBack{6}{0}% +} +\newcommand{\DrawRubikCubeFlat}{% + \DrawRubikCube% + \FlatDown{0}{-3}% + \FlatLeft{-3}{0}% + \FlatBack{4}{1}% +} +\newcommand{\RubikSideBarWidth}[1]{\pgfmathsetmacro{\bw}{#1}} +\newcommand{\RubikSideBarLength}[1]{\pgfmathsetmacro{\bl}{#1}} +\newcommand{\RubikSideBarSep}[1]{\pgfmathsetmacro{\bs}{#1}} +\RubikSideBarWidth{0.3}% +\RubikSideBarLength{1}% +\RubikSideBarSep{0.3}% +\newcommand{\side@barL}[2]{% +%% #1 = cubie possn no, #2 = colour +\pgfmathsetmacro{\blh}{\bl*(0.5)}% +\pgfmathsetmacro{\dx}{0 - \bs - \bw}% +\pgfmathsetmacro{\dy}{#1-1+0.5-\blh}% +\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +} +\newcommand{\side@barR}[2]{% +%% #1 = cubie possn no, #2 = colour +\pgfmathsetmacro{\blh}{\bl*(0.5)}% +\pgfmathsetmacro{\dx}{3 + \bs}% +\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh}% +\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +} +\newcommand{\side@barT}[2]{% +%% #1 = cubie possn no, #2 = colour +\pgfmathsetmacro{\blh}{\bl*(0.5)}% +\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% +\pgfmathsetmacro{\dy}{3 +\bs}% +\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +} +\newcommand{\side@barB}[2]{% +%% #1 = cubie possn no, #2 = colour +\pgfmathsetmacro{\blh}{\bl*(0.5)}% +\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% +\pgfmathsetmacro{\dy}{0 -\bs-\bw}% +\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +} +%%---Left side +\newcommand{\DrawRubikLayerSideLTx}[1]{\side@barL{3}{#1}} +\newcommand{\DrawRubikLayerSideLEx}[1]{\side@barL{2}{#1}} +\newcommand{\DrawRubikLayerSideLE}[1]{\side@barL{2}{#1}} +\newcommand{\DrawRubikLayerSideLBx}[1]{\side@barL{1}{#1}} +\newcommand{\DrawRubikLayerSideRTx}[1]{\side@barR{3}{#1}} +\newcommand{\DrawRubikLayerSideREx}[1]{\side@barR{2}{#1}} +\newcommand{\DrawRubikLayerSideRE}[1]{\side@barR{2}{#1}} +\newcommand{\DrawRubikLayerSideRBx}[1]{\side@barR{1}{#1}} +\newcommand{\DrawRubikLayerSideLTy}[1]{\side@barT{1}{#1}} +\newcommand{\DrawRubikLayerSideMTy}[1]{\side@barT{2}{#1}} +\newcommand{\DrawRubikLayerSideMT}[1]{\side@barT{2}{#1}} +\newcommand{\DrawRubikLayerSideRTy}[1]{\side@barT{3}{#1}} +\newcommand{\DrawRubikLayerSideLBy}[1]{\side@barB{1}{#1}} +\newcommand{\DrawRubikLayerSideMBy}[1]{\side@barB{2}{#1}} +\newcommand{\DrawRubikLayerSideMB}[1]{\side@barB{2}{#1}} +\newcommand{\DrawRubikLayerSideRBy}[1]{\side@barB{3}{#1}} +%%--Top side--- +\newcommand{\DrawRubikLayerSideT}[3]{% + \DrawRubikLayerSideLTy{#1}% + \DrawRubikLayerSideMTy{#2}% + \DrawRubikLayerSideRTy{#3}% +} +%%--Bottom side--- +\newcommand{\DrawRubikLayerSideB}[3]{% + \DrawRubikLayerSideLBy{#1}% + \DrawRubikLayerSideMBy{#2}% + \DrawRubikLayerSideRBy{#3}% +} +%%--Left side-------- +%% colours run vertically DOWN +\newcommand{\DrawRubikLayerSideL}[3]{% + \DrawRubikLayerSideLTx{#1}% + \DrawRubikLayerSideLEx{#2}% + \DrawRubikLayerSideLBx{#3}% +} +%%--Right side-------- +%% colours run vertically DOWN +\newcommand{\DrawRubikLayerSideR}[3]{% + \DrawRubikLayerSideRTx{#1}% + \DrawRubikLayerSideREx{#2}% + \DrawRubikLayerSideRBx{#3}% +} +\newcommand{\DrawRubikLayerSideLR}[6]{% + \DrawRubikLayerSideLTx{#1}% + \DrawRubikLayerSideRTx{#2}% + \DrawRubikLayerSideLEx{#3}% + \DrawRubikLayerSideREx{#4}% + \DrawRubikLayerSideLBx{#5}% + \DrawRubikLayerSideRBx{#6}% +} +\newcommand{\DrawNCubeAll}[4]{% + \pgfmathsetmacro{\ncubes}{#1-1}% +%% need to subtract 1 from the given number of cubies per side +%% to avoid the origin of the initial cube to be displaced + \foreach \x in {0,...,\ncubes}{% + \foreach \y in {0,...,\ncubes}{% + \foreach \z in {0,...,\ncubes}{% + \cube@dxdydz{1}{#2}{#3}{#4}{\x}{\y}{\z}% + }}}} +\newcommand{\cube@dxdydz}[7]{% + \pgfmathsetmacro{\dx}{#1+#5}% +%% calculates the 'displacement' (distance from the origin) of the +%% far corners of the cube along the x axis from the arguments + \pgfmathsetmacro{\dy}{#1+#6}% +%% calculates the 'displacement' (distance from the origin) of the +%% far corners of the cube along the y axis from the arguments + \pgfmathsetmacro{\dz}{#1+#7}% +%% calculates the 'displacement' (distance from the origin) of the +%% far corners of the cube along the z axis from the arguments +%% Draw FRONT face (using the X colour = #4) + \draw[line join=round,line cap=round,ultra thick,fill=#4]% + (#5,#6,\dz) -- (\dx,#6,\dz) -- (\dx,\dy,\dz) -- (#5,\dy,\dz) -- cycle; +%% The 'rectangle' command does not work with 3D coordinates, +%% so this is the way to draw the squres with space coordinates +%% Draw UP face (using the Y colour = #3) + \draw[line join=round,line cap=round,ultra thick,fill=#3]% + (#5,\dy,\dz) -- (\dx,\dy,\dz) -- (\dx,\dy,#7) -- (#5,\dy,#7) -- cycle; +%% Draw RIGHT face (using the X colour = #2) + \draw[line join=round,line cap=round,ultra thick,fill=#2]% + (\dx,#6,\dz) -- (\dx,#6,#7) -- (\dx,\dy,#7) -- (\dx,\dy,\dz) -- cycle; + } +\newcommand{\Cubiedx}[1]{\pgfmathsetmacro{\cx}{#1}} +\newcommand{\Cubiedy}[1]{\pgfmathsetmacro{\cy}{#1}} +\Cubiedx{0.4} +\Cubiedy{0.4} +\newcommand{\DrawCubieRU}[3]{% +%% Front face (z) +\draw[line join=round,line cap=round,ultra thick,fill=#3]% + (0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; +%% Up face(y) +\draw[line join=round,line cap=round,ultra thick,fill=#2]% + (0,1) -- (\cx, 1+\cy) -- (1+\cx,1+\cy) -- (1,1) -- cycle; +%% Right face(x) +\draw[line join=round,line cap=round,ultra thick,fill=#1]% + (1,0) -- (1,1) -- (1+\cx,1+\cy) -- (1+\cx, \cy) -- cycle; +} +\newcommand{\DrawCubieRD}[3]{% +%% Front face (z) +\draw[line join=round,line cap=round,ultra thick,fill=#3]% + (0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; +%% Down face (y) +\draw[line join=round,line cap=round,ultra thick,fill=#2]% + (\cx,-\cy) -- (0, 0) -- (1,0) -- (1+\cx,-\cy) -- cycle; +%% Right face (x) +\draw[line join=round,line cap=round,ultra thick,fill=#1]% + (1,0) -- (1,1) -- (1+\cx,-\cy+1) -- (1+\cx, -\cy) -- cycle; +} +\newcommand{\DrawCubieLD}[3]{% +%% Front face (z) +\draw[line join=round,line cap=round,ultra thick,fill=#3]% + (0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; +%% Down face (y) +\draw[line join=round,line cap=round,ultra thick,fill=#2]% + (-\cx,-\cy) -- (0, 0) -- (1,0) -- (1-\cx,-\cy) -- cycle; +%% Left face (x) +\draw[line join=round,line cap=round,ultra thick,fill=#1]% + (-\cx,-\cy) -- (-\cx,-\cy+1) -- (0,1) -- (0,0) -- cycle; +} +\newcommand{\DrawCubieLU}[3]{% +%% Front face (z) +\draw[line join=round,line cap=round,ultra thick,fill=#3]% + (0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; +%% Up face (y) +\draw[line join=round,line cap=round,ultra thick,fill=#2]% + (-\cx,1+\cy) -- (1-\cx, 1+\cy) -- (1,1) -- (0,1) -- cycle; +%% Left face (x) +\draw[line join=round,line cap=round,ultra thick,fill=#1]% + (-\cx, \cy) -- (-\cx,\cy+1) -- (0,1) -- (0,0) -- cycle; +} +\newcommand{\textCubieRU}[3]{% +\begin{minipage}{0.66cm} +\centering +\begin{tikzpicture}[scale=0.5] +\Cubiedx{0.4}\Cubiedy{0.4} +\DrawCubieRU{#1}{#2}{#3} +\end{tikzpicture} +\end{minipage} +} +\newcommand{\textCubieRD}[3]{% +\begin{minipage}{0.66cm} +\centering +\begin{tikzpicture}[scale=0.5] +\Cubiedx{0.4}\Cubiedy{0.4} +\DrawCubieRD{#1}{#2}{#3} +\end{tikzpicture} +\end{minipage} +} +\newcommand{\textCubieLD}[3]{% +\begin{minipage}{0.66cm} +\centering +\begin{tikzpicture}[scale=0.5] +\Cubiedx{0.4}\Cubiedy{0.4} +\DrawCubieLD{#1}{#2}{#3} +\end{tikzpicture} +\end{minipage} +} +\newcommand{\textCubieLU}[3]{% +\begin{minipage}{0.66cm} +\centering +\begin{tikzpicture}[scale=0.5] +\Cubiedx{0.4}\Cubiedy{0.4} +\DrawCubieLU{#1}{#2}{#3} +\end{tikzpicture} +\end{minipage} +} +\newcommand{\DrawNotationBox}{% + \draw [thick] (0,0) -- (0,1) -- (1,1) -- (1,0) -- (0,0) -- (0,1)% +} +\pgfmathsetmacro{\sd}{0.25} % horiz space +\pgfmathsetmacro{\sdd}{2*\sd} +\pgfmathsetmacro{\sddd}{3*\sd} +\pgfmathsetmacro{\sh}{0.6} % height +\pgfmathsetmacro{\sb}{0.2} % base +\pgfmathsetmacro{\sbh}{\sb + \sh} % UP +\pgfmathsetmacro{\scx}{\sdd+0.2} % Start of CircleX +\pgfmathsetmacro{\scy}{\sd*2/3} % Start of CircleY +\pgfmathsetmacro{\sqcx}{\scx-0.13} %% SQuare CenterX +\pgfmathsetmacro{\sqcy}{\scy+0.25} %% SQuare CenterY +\newcommand{\rrB}{\@rr{B}} +\newcommand{\SquareB}{\@SquareLetter{\rrB}} +\newcommand{\rrhB}{\raisebox{-0.25mm}{\SquareB}\,} +\newcommand{\RubikB}{\raisebox{\@hRubik}{\SquareB}\,} +\newcommand{\textRubikB}{\rrhB\,} +\newcommand{\rrBp}{\@rrp{B}} +\newcommand{\SquareBp}{\@SquareLetter{\rrBp}} +\newcommand{\rrhBp}{\raisebox{-0.25mm}{\SquareBp}\,} +\newcommand{\RubikBp}{\raisebox{\@hRubik}{\SquareBp}\,} +\newcommand{\textRubikBp}{\rrhBp\,} +\newcommand{\rrBw}{\@rrw{B}} +\newcommand{\SquareBw}{\@SquareLetter{\rrBw}} +\newcommand{\rrhBw}{\raisebox{-0.25mm}{\SquareBw}\,} +\newcommand{\RubikBw}{\raisebox{\@hRubik}{\SquareBw}\,} +\newcommand{\textRubikBw}{\rrhBw\,} +\newcommand{\rrBwp}{\@rrwp{B}} +\newcommand{\SquareBwp}{\@SquareLetter{\rrBwp}} +\newcommand{\rrhBwp}{\raisebox{-0.25mm}{\SquareBwp}\,} +\newcommand{\RubikBwp}{\raisebox{\@hRubik}{\SquareBwp}\,} +\newcommand{\textRubikBwp}{\rrhBwp\,} +\newcommand{\rrBs}{\@rrs{B}} +\newcommand{\SquareBs}{\@SquareLetter{\rrBs}} +\newcommand{\rrhBs}{\raisebox{-0.25mm}{\SquareBs}\,} +\newcommand{\RubikBs}{\raisebox{\@hRubik}{\SquareBs}\,} +\newcommand{\textRubikBs}{\rrhBs\,} +\newcommand{\rrBsp}{\@rrsp{B}} +\newcommand{\SquareBsp}{\@SquareLetter{\rrBsp}} +\newcommand{\rrhBsp}{\raisebox{-0.25mm}{\SquareBsp}\,} +\newcommand{\RubikBsp}{\raisebox{\@hRubik}{\SquareBsp}\,} +\newcommand{\textRubikBsp}{\rrhBsp\,} +\newcommand{\rrBa}{\@rra{B}} +\newcommand{\SquareBa}{\@SquareLetter{\rrBa}} +\newcommand{\rrhBa}{\raisebox{-0.25mm}{\SquareBa}\,} +\newcommand{\RubikBa}{\raisebox{\@hRubik}{\SquareBa}\,} +\newcommand{\textRubikBa}{\rrhBa\,} +\newcommand{\rrBap}{\@rrap{B}} +\newcommand{\SquareBap}{\@SquareLetter{\rrBap}} +\newcommand{\rrhBap}{\raisebox{-0.25mm}{\SquareBap}\,} +\newcommand{\RubikBap}{\raisebox{\@hRubik}{\SquareBap}\,} +\newcommand{\textRubikBap}{\rrhBap\,} +\newcommand{\rrD}{\textbf{\textsf{D}}} +%% +\newcommand{\SquareD}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}%% +} +\newcommand{\rrhD}{\raisebox{-0.333\height}{\SquareD}\,} +%% +\newcommand{\RubikD}{% +\begin{minipage}{0.6cm} +\centering +\SquareD\\ +\rrD +\end{minipage}% +} +\newcommand{\textRubikD}{\rrD\,\rrhD} +\newcommand{\rrDp}{\textbf{\textsf{D}$^\prime$}} +%% +\newcommand{\SquareDp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDp}{\raisebox{-0.333\height}{\SquareDp}\,} +%% +\newcommand{\RubikDp}{% +\begin{minipage}{0.6cm} +\centering +\SquareDp\\ +\rrDp +\end{minipage}% +} +\newcommand{\textRubikDp}{\rrDp\,\rrhDp} +\newcommand{\rrDw}{\textbf{\textsf{D\footnotesize{w}}}} +%% +\newcommand{\SquareDw}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, ->] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDw}{\raisebox{-0.333\height}{\SquareDw}\,} +%% +\newcommand{\RubikDw}{% +\begin{minipage}{0.6cm} +\centering +\SquareDw\\ +\rrDw +\end{minipage}% +} +\newcommand{\textRubikDw}{\rrDw\,\rrhDw} +\newcommand{\rrDwp}{\textbf{\textsf{D\footnotesize{w}}$^\prime$}} +%% +\newcommand{\SquareDwp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, <-] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDwp}{\raisebox{-0.333\height}{\SquareDwp}\,} +%% +\newcommand{\RubikDwp}{% +\begin{minipage}{0.6cm} +\centering +\SquareDwp\\ +\rrDwp +\end{minipage}% +} +\newcommand{\textRubikDwp}{\rrDwp\,\rrhDwp} +\newcommand{\rrDs}{\@rrs{D}} +%% +\newcommand{\SquareDs}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDs}{\raisebox{-0.333\height}{\SquareDs}\,} +%% +\newcommand{\RubikDs}{% +\begin{minipage}{0.6cm} +\centering +\SquareDs\\ +\rrDs +\end{minipage}% +} +\newcommand{\textRubikDs}{\rrDs\,\rrhDs} +\newcommand{\rrDsp}{\@rrsp{D}} +%% +\newcommand{\SquareDsp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDsp}{\raisebox{-0.333\height}{\SquareDsp}\,} +%% +\newcommand{\RubikDsp}{% +\begin{minipage}{0.6cm} +\centering +\SquareDsp\\ +\rrDsp +\end{minipage}% +} +\newcommand{\textRubikDsp}{\rrDsp\,\rrhDsp} +\newcommand{\rrDa}{\@rra{D}} +%% +\newcommand{\SquareDa}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDa}{\raisebox{-0.333\height}{\SquareDa}\,} +%% +\newcommand{\RubikDa}{% +\begin{minipage}{0.6cm} +\centering +\SquareDa\\ +\rrDa +\end{minipage}% +} +\newcommand{\textRubikDa}{\rrDa\,\rrhDa} +\newcommand{\rrDap}{\@rrap{D}} +%% +\newcommand{\SquareDap}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhDap}{\raisebox{-0.333\height}{\SquareDap}\,} +%% +\newcommand{\RubikDap}{% +\begin{minipage}{0.6cm} +\centering +\SquareDap\\ +\rrDap +\end{minipage}% +} +\newcommand{\textRubikDap}{\rrDap\,\rrhDap} +\newcommand{\rrE}{\textbf{\textsf{E}}} +%% +\newcommand{\SquareE}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, ->] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhE}{\raisebox{-0.333\height}{\SquareE}\,} +%% +\newcommand{\RubikE}{% +\begin{minipage}{0.6cm} +\centering +\SquareE\\ +\rrE +\end{minipage}% +} +\newcommand{\textRubikE}{\rrE\,\rrhE} +\newcommand{\rrEp}{\textbf{\textsf{E}$^\prime$}} +%% +\newcommand{\SquareEp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, <-] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhEp}{\raisebox{-0.333\height}{\SquareEp}\,} +%% +\newcommand{\RubikEp}{% +\begin{minipage}{0.6cm} +\centering +\SquareEp\\ +\rrEp +\end{minipage}% +} +\newcommand{\textRubikEp}{\rrEp\,\rrhEp} +\newcommand{\rrF}{\textbf{\textsf{F}}} +%% +\newcommand{\SquareF}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\scx, \scy) arc[radius=0.35, start angle=-60, delta angle=290]; +\end{tikzpicture}% +} +\newcommand{\rrhF}{\raisebox{-0.333\height}{\SquareF}\,} +%% +\newcommand{\RubikF}{% +\begin{minipage}{0.6cm} +\centering +\SquareF\\ +\rrF +\end{minipage}% +} +\newcommand{\textRubikF}{\rrF\,\rrhF} +\newcommand{\rrFp}{\textbf{\textsf{F}$^\prime$}} +%% +\newcommand{\SquareFp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\scx, \scy) arc[radius=0.35, start angle=-60, delta angle=290]; +\end{tikzpicture}% +} +\newcommand{\rrhFp}{\raisebox{-0.333\height}{\SquareFp}\,} +%% +\newcommand{\RubikFp}{% +\begin{minipage}{0.6cm} +\centering +\SquareFp\\ +\rrFp +\end{minipage}% +} +\newcommand{\textRubikFp}{\rrFp\,\rrhFp} +\newcommand{\rrFw}{\textbf{\textsf{F\footnotesize{w}}}} +%% +\newcommand{\SquareFw}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\scx, \scy) arc[radius=0.35, start angle=-60, delta angle=290]; +\draw [thick] (\sqcx,\sqcy) arc[radius=0.1, start angle=-60, delta angle=360]; +\end{tikzpicture}% +} +\newcommand{\rrhFw}{\raisebox{-0.333\height}{\SquareFw}\,} +%% +\newcommand{\RubikFw}{% +\begin{minipage}{0.6cm} +\centering +\SquareFw\\ +\rrFw +\end{minipage}% +} +\newcommand{\textRubikFw}{\rrFw\,\rrhFw} +\newcommand{\rrFwp}{\textbf{\textsf{F\footnotesize{w}}$^\prime$}} +%% +\newcommand{\SquareFwp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\scx, \scy) arc[radius=0.35, start angle=-60, delta angle=290]; +\draw [thick] (\sqcx,\sqcy) arc[radius=0.1, start angle=-60, delta angle=360]; +\end{tikzpicture}% +} +\newcommand{\rrhFwp}{\raisebox{-0.333\height}{\SquareFwp}\,} +%% +\newcommand{\RubikFwp}{% +\begin{minipage}{0.6cm} +\centering +\SquareFwp\\ +\rrFwp +\end{minipage}% +} +\newcommand{\textRubikFwp}{\rrFwp\,\rrhFwp} +%% +\newcommand{\rrFs}{\@rrs{F}} +\newcommand{\SquareFs}{\@SquareLetter{\rrFs}} +\newcommand{\rrhFs}{\raisebox{-0.25mm}{\SquareFs}\,} +\newcommand{\RubikFs}{\raisebox{\@hRubik}{\SquareFs}\,} +\newcommand{\textRubikFs}{\rrhFs\,} +\newcommand{\rrFsp}{\@rrsp{F}} +\newcommand{\SquareFsp}{\@SquareLetter{\rrFsp}} +\newcommand{\rrhFsp}{\raisebox{-0.25mm}{\SquareFsp}\,} +\newcommand{\RubikFsp}{\raisebox{\@hRubik}{\SquareFsp}\,} +\newcommand{\textRubikFsp}{\rrhFsp\,} +\newcommand{\rrFa}{\@rra{F}} +\newcommand{\SquareFa}{\@SquareLetter{\rrFa}} +\newcommand{\rrhFa}{\raisebox{-0.25mm}{\SquareFa}\,} +\newcommand{\RubikFa}{\raisebox{\@hRubik}{\SquareFa}\,} +\newcommand{\textRubikFa}{\rrhFa\,} +\newcommand{\rrFap}{\@rrap{F}} +\newcommand{\SquareFap}{\@SquareLetter{\rrFap}} +\newcommand{\rrhFap}{\raisebox{-0.25mm}{\SquareFap}\,} +\newcommand{\RubikFap}{\raisebox{\@hRubik}{\SquareFap}\,} +\newcommand{\textRubikFap}{\rrhFap\,} +\newcommand{\rrL}{\textbf{\textsf{L}}} +%% +\newcommand{\SquareL}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhL}{\raisebox{-0.333\height}{\SquareL}\,} +%% +\newcommand{\RubikL}{% +\begin{minipage}{0.6cm} +\centering +\SquareL\\ +\rrL +\end{minipage}% +} +\newcommand{\textRubikL}{\rrL\,\rrhL} +\newcommand{\rrLp}{\textbf{\textsf{L}$^\prime$}} +%% +\newcommand{\SquareLp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLp}{\raisebox{-0.333\height}{\SquareLp}\,} +%% +\newcommand{\RubikLp}{% +\begin{minipage}{0.6cm} +\centering +\SquareLp\\ +\rrLp +\end{minipage}% +} +\newcommand{\textRubikLp}{\rrLp\,\rrhLp} +\newcommand{\rrLw}{\textbf{\textsf{L\footnotesize{w}}}} +%% +\newcommand{\SquareLw}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick, <-] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLw}{\raisebox{-0.333\height}{\SquareLw}\,} +%% +\newcommand{\RubikLw}{% +\begin{minipage}{0.6cm} +\centering +\SquareLw\\ +\rrLw +\end{minipage}% +} +\newcommand{\textRubikLw}{\rrLw\,\rrhLw} +\newcommand{\rrLwp}{\textbf{\textsf{L\footnotesize{w}}$^\prime$}} +%% +\newcommand{\SquareLwp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick,->] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLwp}{\raisebox{-0.333\height}{\SquareLwp}\,} +%% +\newcommand{\RubikLwp}{% +\begin{minipage}{0.6cm} +\centering +\SquareLwp\\ +\rrLwp +\end{minipage}% +} +\newcommand{\textRubikLwp}{\rrLwp\,\rrhLwp} +\newcommand{\rrLs}{\@rrs{L}} +%% +\newcommand{\SquareLs}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, <-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLs}{\raisebox{-0.333\height}{\SquareLs}\,} +%% +\newcommand{\RubikLs}{% +\begin{minipage}{0.6cm} +\centering +\SquareLs\\ +\rrLs +\end{minipage}% +} +\newcommand{\textRubikLs}{\rrLs\,\rrhLs} +\newcommand{\rrLsp}{\@rrsp{L}} +%% +\newcommand{\SquareLsp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, ->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLsp}{\raisebox{-0.333\height}{\SquareLsp}\,} +%% +\newcommand{\RubikLsp}{% +\begin{minipage}{0.6cm} +\centering +\SquareLsp\\ +\rrLsp +\end{minipage}% +} +\newcommand{\textRubikLsp}{\rrLsp\,\rrhLsp} +\newcommand{\rrLa}{\@rra{L}} +%% +\newcommand{\SquareLa}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, ->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLa}{\raisebox{-0.333\height}{\SquareLa}\,} +%% +\newcommand{\RubikLa}{% +\begin{minipage}{0.6cm} +\centering +\SquareLa\\ +\rrLa +\end{minipage}% +} +\newcommand{\textRubikLa}{\rrLa\,\rrhLa} +\newcommand{\rrLap}{\@rrap{L}} +%% +\newcommand{\SquareLap}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, <-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhLap}{\raisebox{-0.333\height}{\SquareLap}\,} +%% +\newcommand{\RubikLap}{% +\begin{minipage}{0.6cm} +\centering +\SquareLap\\ +\rrLap +\end{minipage}% +} +\newcommand{\textRubikLap}{\rrLap\,\rrhLap} +\newcommand{\rrM}{\textbf{\textsf{M}}} +%% +\newcommand{\SquareM}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick, <-] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhM}{\raisebox{-0.333\height}{\SquareM}\,} +%% +\newcommand{\RubikM}{% +\begin{minipage}{0.6cm} +\centering +\SquareM\\ +\rrM +\end{minipage}% +} +\newcommand{\textRubikM}{\rrM\,\rrhM} +\newcommand{\rrMp}{\textbf{\textsf{M}$^\prime$}} +%% +\newcommand{\SquareMp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick,->] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhMp}{\raisebox{-0.333\height}{\SquareMp}\,} +%% +\newcommand{\RubikMp}{% +\begin{minipage}{0.6cm} +\centering +\SquareMp\\ +\rrMp +\end{minipage}% +} +\newcommand{\textRubikMp}{\rrMp\,\rrhMp} +\newcommand{\rrR}{\textbf{\textsf{R}}} +%% +\newcommand{\SquareR}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +%% draw three lines in the square, one with an arrow +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, ->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhR}{\raisebox{-0.333\height}{\SquareR}\,} +%% +\newcommand{\RubikR}{% +\begin{minipage}{0.6cm} +\centering +\SquareR\\ +\rrR +\end{minipage}% +} +\newcommand{\textRubikR}{\rrR\,\rrhR} +\newcommand{\rrRp}{\textbf{\textsf{R}$^\prime$}} +%% +\newcommand{\SquareRp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, <-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRp}{\raisebox{-0.333\height}{\SquareRp}\,} +%% +\newcommand{\RubikRp}{% +\begin{minipage}{0.6cm} +\centering +\SquareRp\\ +\rrRp +\end{minipage}% +} +\newcommand{\textRubikRp}{\rrRp\,\rrhRp} +\newcommand{\rrRw}{\textbf{\textsf{R\footnotesize{w}}}} +%% +\newcommand{\SquareRw}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick, ->] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, ->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRw}{\raisebox{-0.333\height}{\SquareRw}\,} +%% +\newcommand{\RubikRw}{% +\begin{minipage}{0.6cm} +\centering +\SquareRw\\ +\rrRw +\end{minipage}% +} +\newcommand{\textRubikRw}{\rrRw\,\rrhRw} +\newcommand{\rrRwp}{\textbf{\textsf{R\footnotesize{w}}$^\prime$}} +%% +\newcommand{\SquareRwp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\sd, \sb) -- (\sd, \sbh); +\draw [thick, <-] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick, <-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRwp}{\raisebox{-0.333\height}{\SquareRwp}\,} +%% +\newcommand{\RubikRwp}{% +\begin{minipage}{0.6cm} +\centering +\SquareRwp\\ +\rrRwp +\end{minipage}% +} +\newcommand{\textRubikRwp}{\rrRwp\,\rrhRwp} +\newcommand{\rrRs}{\@rrs{R}} +%% +\newcommand{\SquareRs}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick,->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRs}{\raisebox{-0.333\height}{\SquareRs}\,} +%% +\newcommand{\RubikRs}{% +\begin{minipage}{0.6cm} +\centering +\SquareRs\\ +\rrRs +\end{minipage}% +} +\newcommand{\textRubikRs}{\rrRs\,\rrhRs} +\newcommand{\rrRsp}{\@rrsp{R}} +%% +\newcommand{\SquareRsp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,<-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick,<-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRsp}{\raisebox{-0.333\height}{\SquareRsp}\,} +%% +\newcommand{\RubikRsp}{% +\begin{minipage}{0.6cm} +\centering +\SquareRsp\\ +\rrRsp +\end{minipage}% +} +\newcommand{\textRubikRsp}{\rrRsp\,\rrhRsp} +\newcommand{\rrRa}{\@rra{R}} +%% +\newcommand{\SquareRa}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,<-] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick,->] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRa}{\raisebox{-0.333\height}{\SquareRa}\,} +%% +\newcommand{\RubikRa}{% +\begin{minipage}{0.6cm} +\centering +\SquareRa\\ +\rrRa +\end{minipage}% +} +\newcommand{\textRubikRa}{\rrRa\,\rrhRa} +\newcommand{\rrRap}{\@rrap{R}} +%% +\newcommand{\SquareRap}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,->] (\sd, \sb) -- (\sd, \sbh); +\draw [thick] (\sdd,\sb) -- (\sdd, \sbh); +\draw [thick,<-] (\sddd, \sb) -- (\sddd, \sbh); +\end{tikzpicture}% +} +\newcommand{\rrhRap}{\raisebox{-0.333\height}{\SquareRap}\,} +%% +\newcommand{\RubikRap}{% +\begin{minipage}{0.6cm} +\centering +\SquareRap\\ +\rrRap +\end{minipage}% +} +\newcommand{\textRubikRap}{\rrRap\,\rrhRap} +\newcommand{\rrS}{\@rr{S}} +\newcommand{\SquareS}{\@SquareLetter{\rrS}} +\newcommand{\rrhS}{\raisebox{-0.25mm}{\SquareS}\,} +\newcommand{\RubikS}{\raisebox{\@hRubik}{\SquareS}\,} +\newcommand{\textRubikS}{\rrhS\,} +\newcommand{\rrSp}{\@rrp{S}} +\newcommand{\SquareSp}{\@SquareLetter{\rrSp}} +\newcommand{\rrhSp}{\raisebox{-0.25mm}{\SquareSp}\,} +\newcommand{\RubikSp}{\raisebox{\@hRubik}{\SquareSp}\,} +\newcommand{\textRubikSp}{\rrhSp\,} +\newcommand{\rrSu}{\textbf{\textsf{S\footnotesize{u}}}} +\newcommand{\rrhSu}{\rrhEp}% +\newcommand{\RubikSu}{% +\begin{minipage}{0.6cm} +\centering +\SquareEp\\ +\rrSu +\end{minipage}% +} +\newcommand{\textRubikSu}{\rrSu\,\rrhEp} +\newcommand{\rrSup}{\textbf{\textsf{S\footnotesize{u}}$^\prime$}} +\newcommand{\rrhSup}{\rrhE}% +\newcommand{\RubikSup}{% +\begin{minipage}{0.6cm} +\centering +\SquareE\\ +\rrSup +\end{minipage}% +} +\newcommand{\textRubikSup}{\rrSup\,\rrhE} +\newcommand{\rrSd}{\textbf{\textsf{S\footnotesize{d}}}} +\newcommand{\rrhSd}{\rrhE}% +\newcommand{\RubikSd}{% +\begin{minipage}{0.6cm} +\centering +\SquareE\\ +\rrSd +\end{minipage}% +} +\newcommand{\textRubikSd}{\rrSd\,\rrhE} +\newcommand{\rrSdp}{\textbf{\textsf{S\footnotesize{d}}$^\prime$}} +\newcommand{\rrhSdp}{\rrhEp}% +\newcommand{\RubikSdp}{% +\begin{minipage}{0.6cm} +\centering +\SquareEp\\ +\rrSdp +\end{minipage}% +} +\newcommand{\textRubikSdp}{\rrSdp\,\rrhEp} +\newcommand{\rrSl}{\textbf{\textsf{S\footnotesize{l}}}} +\newcommand{\rrhSl}{\rrhM}% +\newcommand{\RubikSl}{% +\begin{minipage}{0.6cm} +\centering +\SquareM\\ +\rrSl +\end{minipage}% +} +\newcommand{\textRubikSl}{\rrSl\,\rrhM} +\newcommand{\rrSlp}{\textbf{\textsf{S\footnotesize{l}}$^\prime$}} +\newcommand{\rrhSlp}{\rrhMp}% +\newcommand{\RubikSlp}{% +\begin{minipage}{0.6cm} +\centering +\SquareMp\\ +\rrSlp +\end{minipage}% +} +\newcommand{\textRubikSlp}{\rrSlp\,\rrhMp} +\newcommand{\rrSr}{\textbf{\textsf{S\footnotesize{r}}}} +\newcommand{\rrhSr}{\rrhMp}% +\newcommand{\RubikSr}{% +\begin{minipage}{0.6cm} +\centering +\SquareMp\\ +\rrSr +\end{minipage}% +} +\newcommand{\textRubikSr}{\rrSr\,\rrhMp} +\newcommand{\rrSrp}{\textbf{\textsf{S\footnotesize{r}}$^\prime$}} +\newcommand{\rrhSrp}{\rrhM}% +\newcommand{\RubikSrp}{% +\begin{minipage}{0.6cm} +\centering +\SquareM\\ +\rrSrp +\end{minipage}% +} +\newcommand{\textRubikSrp}{\rrSrp\,\rrhM} +\newcommand{\rrSf}{\textbf{\textsf{S\footnotesize{f}}}} +\newcommand{\SquareSf}{\@SquareLetter{\rrSf}} +\newcommand{\rrhSf}{\raisebox{-0.25mm}{\SquareSf}\,} +\newcommand{\RubikSf}{\raisebox{\@hRubik}{\SquareSf}\,} +\newcommand{\textRubikSf}{\rrhSf\,} +\newcommand{\rrSfp}{\textbf{\textsf{S\footnotesize{f}}$^\prime$}} +\newcommand{\SquareSfp}{\@SquareLetter{\rrSfp}} +\newcommand{\rrhSfp}{\raisebox{-0.25mm}{\SquareSfp}\,} +\newcommand{\RubikSfp}{\raisebox{\@hRubik}{\SquareSfp}\,} +\newcommand{\textRubikSfp}{\rrhSfp\,} +\newcommand{\rrSb}{\textbf{\textsf{S\footnotesize{b}}}} +\newcommand{\SquareSb}{\@SquareLetter{\rrSb}} +\newcommand{\rrhSb}{\raisebox{-0.25mm}{\SquareSb}\,} +\newcommand{\RubikSb}{\raisebox{\@hRubik}{\SquareSb}\,} +\newcommand{\textRubikSb}{\rrhSb\,} +\newcommand{\rrSbp}{\textbf{\textsf{S\footnotesize{b}}$^\prime$}} +\newcommand{\SquareSbp}{\@SquareLetter{\rrSbp}} +\newcommand{\rrhSbp}{\raisebox{-0.25mm}{\SquareSbp}\,} +\newcommand{\RubikSbp}{\raisebox{\@hRubik}{\SquareSbp}\,} +\newcommand{\textRubikSbp}{\rrhSbp\,} +\newcommand{\rrU}{\textbf{\textsf{U}}} +%% +\newcommand{\SquareU}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhU}{\raisebox{-0.333\height}{\SquareU}\,} +%% +\newcommand{\RubikU}{% +\begin{minipage}{0.6cm} +\centering +\SquareU\\ +\rrU +\end{minipage}%% +} +\newcommand{\textRubikU}{\rrU\,\rrhU} +\newcommand{\rrUw}{\textbf{\textsf{U\footnotesize{w}}}} +%% +\newcommand{\SquareUw}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, <-] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUw}{\raisebox{-0.333\height}{\SquareUw}\,} +%% +\newcommand{\RubikUw}{% +\begin{minipage}{0.6cm} +\centering +\SquareUw\\ +\rrUw +\end{minipage}%% +} +%% +\newcommand{\textRubikUw}{\rrUw\,\rrhUw} +\newcommand{\rrUp}{\textbf{\textsf{U}$^\prime$}} +%% +\newcommand{\SquareUp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUp}{\raisebox{-0.333\height}{\SquareUp}\,} +%% +\newcommand{\RubikUp}{% +\begin{minipage}{0.6cm} +\centering +\SquareUp\\ +\rrUp +\end{minipage}%% +} +\newcommand{\textRubikUp}{\rrUp\,\rrhUp} +\newcommand{\rrUwp}{\textbf{\textsf{U\footnotesize{w}}$^\prime$}} +%% +\newcommand{\SquareUwp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick, ->] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUwp}{\raisebox{-0.333\height}{\SquareUwp}\,} +%% +\newcommand{\RubikUwp}{% +\begin{minipage}{0.6cm} +\centering +\SquareUwp\\ +\rrUwp +\end{minipage}%% +} +\newcommand{\textRubikUwp}{\rrUwp\,\rrhUwp} +\newcommand{\rrUs}{\@rrs{U}} +%% +\newcommand{\SquareUs}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUs}{\raisebox{-0.333\height}{\SquareUs}\,} +%% +\newcommand{\RubikUs}{% +\begin{minipage}{0.6cm} +\centering +\SquareUs\\ +\rrUs +\end{minipage}% +} +\newcommand{\textRubikUs}{\rrUs\,\rrhUs} +\newcommand{\rrUsp}{\@rrsp{U}} +%% +\newcommand{\SquareUsp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUsp}{\raisebox{-0.333\height}{\SquareUsp}\,} +%% +\newcommand{\RubikUsp}{% +\begin{minipage}{0.6cm} +\centering +\SquareUsp\\ +\rrUsp +\end{minipage}% +} +\newcommand{\textRubikUsp}{\rrUsp\,\rrhUsp} +\newcommand{\rrUa}{\@rra{U}} +%% +\newcommand{\SquareUa}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, ->] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUa}{\raisebox{-0.333\height}{\SquareUa}\,} +%% +\newcommand{\RubikUa}{% +\begin{minipage}{0.6cm} +\centering +\SquareUa\\ +\rrUa +\end{minipage}% +} +\newcommand{\textRubikUa}{\rrUa\,\rrhUa} +\newcommand{\rrUap}{\@rrap{U}} +%% +\newcommand{\SquareUap}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\sb,\sddd) -- (\sbh, \sddd); +\draw [thick] (\sb,\sdd) -- (\sbh, \sdd); +\draw [thick, <-] (\sb,\sd) -- (\sbh, \sd); +\end{tikzpicture}% +} +\newcommand{\rrhUap}{\raisebox{-0.333\height}{\SquareUap}\,} +%% +\newcommand{\RubikUap}{% +\begin{minipage}{0.6cm} +\centering +\SquareUap\\ +\rrUap +\end{minipage}% +} +\newcommand{\textRubikUap}{\rrUap\,\rrhUap} +\newcommand{\rrx}{\textbf{\textsf{x}}} +\newcommand{\Rubikx}{\@xyzRubik{x}} +\newcommand{\rrhx}{\@xyzh{x}} +\newcommand{\rrxp}{\textbf{\textsf{x}$^\prime$}} +\newcommand{\Rubikxp}{\@xyzRubikp{x}} +\newcommand{\rrhxp}{\@xyzhp{x}} +\newcommand{\rry}{\textbf{\textsf{y}}} +\newcommand{\Rubiky}{\@xyzRubik{y}} +\newcommand{\rrhy}{\@xyzh{y}} +\newcommand{\rryp}{\textbf{\textsf{y}$^\prime$}} +\newcommand{\Rubikyp}{\@xyzRubikp{y}} +\newcommand{\rrhyp}{\@xyzhp{y}} +\newcommand{\rrz}{\textbf{\textsf{z}}} +\newcommand{\Rubikz}{\@xyzRubik{z}} +\newcommand{\rrhz}{\@xyzh{z}} +\newcommand{\rrzp}{\textbf{\textsf{z}$^\prime$}} +\newcommand{\Rubikzp}{\@xyzRubikp{z}} +\newcommand{\rrhzp}{\@xyzhp{z}} +\newcommand{\rru}{\textbf{\textsf{u}}} +\newcommand{\Rubiku}{\@xyzRubik{u}} +\newcommand{\rrhu}{\@xyzh{u}} +\newcommand{\rrd}{\textbf{\textsf{d}}} +\newcommand{\Rubikd}{\@xyzRubik{d}} +\newcommand{\rrhd}{\@xyzh{d}} +\newcommand{\rrl}{\textbf{\textsf{l}}} +\newcommand{\Rubikl}{\@xyzRubik{l}} +\newcommand{\rrhl}{\@xyzh{l}} +\newcommand{\rrr}{\textbf{\textsf{r}}} +\newcommand{\Rubikr}{\@xyzRubik{r}} +\newcommand{\rrhr}{\@xyzh{r}} +\newcommand{\rrf}{\textbf{\textsf{f}}} +\newcommand{\Rubikf}{\@xyzRubik{f}} +\newcommand{\rrhf}{\@xyzh{f}} +\newcommand{\rrb}{\textbf{\textsf{b}}} +\newcommand{\Rubikb}{\@xyzRubik{b}} +\newcommand{\rrhb}{\@xyzh{b}} +\endinput +%% +%% End of file `rubikcube.sty'. diff --git a/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty b/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty new file mode 100644 index 00000000000..bbb8d0f1a43 --- /dev/null +++ b/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty @@ -0,0 +1,160 @@ +%% +%% This is file `rubikrotation.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% rubikrotation.dtx (with options: `rubikrotation') +%% +%% ----------------------------------------------------------------- +%% Authors: RWD Nickalls (dick@nickalls.org) +%% and Apostolos Syropoulos (asyropoulos@yahoo.com) +%% Copyright January 2014 RWD Nickalls and A Syropoulos +%% +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any +%% later version: +%% +%% This work consists of the files listed in the README file. +%% ----------------------------------------------------------------- +%% +%% This is a LaTeX/TikZ package for drawing Rubik cubes +%% Please report errors or suggestions for improvement to +%% +%% RWD Nickalls (dick@nickalls.org) +%% Apostolos Syropoulos (asyropoulos@yahoo.com) +%% +%% This package requires the basic TikZ package to be loaded already +%% ------------------------------------------------------------------ + +%%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + + +\def\RRfileversion{2.0}% +\def\RRfiledate{2014/01/20}% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{rubikrotation}[\RRfiledate\space (v\RRfileversion)] +\@ifpackageloaded{rubikcube}{}{% + \typeout{---rubikrotation requires the rubikcube package.}% + }% +\@ifpackageloaded{fancyvrb}{}{% + \typeout{---rubikrotation requires the fancyvrb package% + for VerbatimInput{} command.}% + \RequirePackage{fancyvrb}} +\newcommand{\rubikrotation}{\textsf{rubikrotation}} +{\catcode`\%=12 \global\def\rubikpercentchar{%}}% +\newcommand{\@comment}{\rubikpercentchar\rubikpercentchar\space}% +\newcommand{\@commentone}{\rubikpercentchar}% +%% We need a simple print command for writing comments to a file. +\newcommand{\@print}[1]{\immediate\write\outfile{#1}} +\newcommand{\rubikperlname}{rubikrotation.pl} +\newcommand{\rubikperlcmd}{perl \rubikperlname} +\typeout{---checking for config file (rubikrotation.cfg)...} +\IfFileExists{rubikrotation.cfg}{% + \input{rubikrotation.cfg}% + }{\typeout{---no config file available}% +}% +\typeout{---cleaning file rubikstateNEW.dat}% +\newwrite\outfile% +\immediate\openout\outfile=rubikstateNEW.dat% +\@print{\@comment rubikstateNEW.dat (by TeX)}% +\immediate\closeout\outfile% +\typeout{---creating file rubikstateERRORS.dat}% +\newwrite\outfile% +\immediate\openout\outfile=rubikstateERRORS.dat% +\@print{\@comment rubikstateERRORS.dat}% +\typeout{---checking for Perl script \rubikperlname...} + \IfFileExists{\rubikperlname}{% + \typeout{---\rubikperlname\space exists OK}% + }{\typeout{** ERROR: cannot find Perl program \rubikperlname}% + \@print{\@comment ** ERROR: cannot find Perl program \rubikperlname}}% +\immediate\closeout\outfile% +\typeout{---setting up newwrite for rubikrotation to use...}% +\newwrite\outfile% +\newcommand{\@openstatefile}{\immediate\openout\outfile=rubikstate.dat} +\newcommand{\@closestatefile}{\immediate\closeout\outfile} +\newcommand{\@printrubikstate}{% + \@print{up,\Ult,\Umt,\Urt,\Ulm,\Umm,\Urm,\Ulb,\Umb,\Urb}% + \@print{down,\Dlt,\Dmt,\Drt,\Dlm,\Dmm,\Drm,\Dlb,\Dmb,\Drb}% + \@print{left,\Llt,\Lmt,\Lrt,\Llm,\Lmm,\Lrm,\Llb,\Lmb,\Lrb}% + \@print{right,\Rlt,\Rmt,\Rrt,\Rlm,\Rmm,\Rrm,\Rlb,\Rmb,\Rrb}% + \@print{front,\Flt,\Fmt,\Frt,\Flm,\Fmm,\Frm,\Flb,\Fmb,\Frb}% + \@print{back,\Blt,\Bmt,\Brt,\Blm,\Bmm,\Brm,\Blb,\Bmb,\Brb}% + \@print{checkstate}% +} +\newcommand{\RubikRotation}[1]{\IfFileExists{\rubikperlname}{% + \typeout{---NEW rotation command------------------}% + \typeout{---command = RubikRotation{#1}}% + \typeout{---Perl script \rubikperlname\space exists OK}% + \typeout{---writing current Rubik state to file rubikstate.dat}% + \@openstatefile% open data file + \@print{\@comment filename: rubikstate.dat}% + \@printrubikstate% + \@print{rotation,#1}% + \@closestatefile% close data file + \typeout{---running Perl script}% + \immediate\write18{\rubikperlcmd}% + \typeout{---inputting NEW datafile (from Perl)}% + \input{rubikstateNEW.dat}% + \typeout{-----------------------------------------}% + }{\typeout{** ERROR: \rubikperlname\space does not exist}% +}} +\newcommand{\ShowRubikErrors}{% + \typeout{---ShowRubikErrors: inputting file rubikstateERRORS.dat}% + \VerbatimInput{rubikstateERRORS.dat}} +\newcommand{\CheckRubikState}{\IfFileExists{\rubikperlname}{% + \typeout{---NEW check command------------------}% + \typeout{---command = CheckRubikState}% + \typeout{---Perl script \rubikperlname\space exists OK}% + \typeout{---writing current Rubik state to file rubikstate.dat}% + \@openstatefile% opens data file + \@print{\@comment filename: rubikstate.dat}% + \@printrubikstate% + \@closestatefile% close data file + \typeout{---running Perl script}% + \immediate\write18{\rubikperlcmd}% + \typeout{---inputting NEW datafile (from Perl)}% + \input{rubikstateNEW.dat}% + \typeout{-----------------------------------------}% + }{\typeout{** ERROR: \rubikperlname\space does not exist}% +}} +\newcommand{\SaveRubikState}[1]{% +\typeout{---NEW save command------------------}% +\typeout{---command = SaveRubikState{#1}}% +\typeout{---saving Rubik state data to file #1}% +\immediate\openout\outfile=#1% +\@print{\@comment filename: #1\@commentone}% +\@print{\string\RubikFaceUp% + {\Ult}{\Umt}{\Urt}{\Ulm}{\Umm}{\Urm}{\Ulb}{\Umb}{\Urb}\@commentone}% +\@print{\string\RubikFaceDown% + {\Dlt}{\Dmt}{\Drt}{\Dlm}{\Dmm}{\Drm}{\Dlb}{\Dmb}{\Drb}\@commentone}% +\@print{\string\RubikFaceLeft% + {\Llt}{\Lmt}{\Lrt}{\Llm}{\Lmm}{\Lrm}{\Llb}{\Lmb}{\Lrb}\@commentone}% +\@print{\string\RubikFaceRight% + {\Rlt}{\Rmt}{\Rrt}{\Rlm}{\Rmm}{\Rrm}{\Rlb}{\Rmb}{\Rrb}\@commentone}% +\@print{\string\RubikFaceFront% + {\Flt}{\Fmt}{\Frt}{\Flm}{\Fmm}{\Frm}{\Flb}{\Fmb}{\Frb}\@commentone}% +\@print{\string\RubikFaceBack% + {\Blt}{\Bmt}{\Brt}{\Blm}{\Bmm}{\Brm}{\Blb}{\Bmb}{\Brb}\@commentone}% +\immediate\closeout\outfile% +\typeout{-----------------------------------------}% +}% +\endinput +%% +%% End of file `rubikrotation.sty'. -- cgit v1.2.3