commit 9ef630eefb683dcdbe56e96e51b10bf356f20505 parent 3d54256257bef55e398f26ab1f0f7aa21901eddd Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Thu, 5 Oct 2023 16:18:33 +0200 Added transformation util files, renamed move files Diffstat:
70 files changed, 69 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md @@ -4,7 +4,6 @@ Work in progress. TODO: -* finish second half of transformations * implement writecubesrc() to make it easy to implement transformations * implement transformations * setup benchmarks diff --git a/src/constants.h b/src/constants.h @@ -36,7 +36,7 @@ #define LDr 14 #define LBr 15 #define FUr 16 -#define FRr 16 +#define FRr 17 #define FDr 18 #define FLr 19 #define BUr 20 diff --git a/utils/TRANSFORMATIONS.txt b/utils/TRANSFORMATIONS.txt @@ -0,0 +1,17 @@ +Transformations can be either simple rotations or a rotation composed +with a mirroring. + +Simple rotations are denoted by two letters corresponding to the faces +to be moved to the U and F positions, respectively. For example FD is +the rotation that brings the F face on top and the D face on front. + +A composed rotation + mirror is obtained by applying the corresponding +rotation to the solved cube mirrored along the M plane. + +The orientation of pieces after a rotation ignores the new position +of centers. A rotated cube can technically be inconsistent, because +the parity of the edge permutation has to be adjusted considering the +parity of the centers, which we ignore. + +The utility script mirror.sh transforms a solved, rotated cube to its +mirrored and rotated version. diff --git a/utils/mirror.sh b/utils/mirror.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sed 's/R/l/g ; s/L/R/g ; s/l/L/g' diff --git a/utils/move_U.txt b/utils/move_00_U.txt diff --git a/utils/move_U2.txt b/utils/move_01_U2.txt diff --git a/utils/move_U3.txt b/utils/move_02_U3.txt diff --git a/utils/move_D.txt b/utils/move_03_D.txt diff --git a/utils/move_D2.txt b/utils/move_04_D2.txt diff --git a/utils/move_D3.txt b/utils/move_05_D3.txt diff --git a/utils/move_R.txt b/utils/move_06_R.txt diff --git a/utils/move_R2.txt b/utils/move_07_R2.txt diff --git a/utils/move_R3.txt b/utils/move_08_R3.txt diff --git a/utils/move_L.txt b/utils/move_09_L.txt diff --git a/utils/move_L2.txt b/utils/move_10_L2.txt diff --git a/utils/move_L3.txt b/utils/move_11_L3.txt diff --git a/utils/move_F.txt b/utils/move_12_F.txt diff --git a/utils/move_F2.txt b/utils/move_13_F2.txt diff --git a/utils/move_F3.txt b/utils/move_14_F3.txt diff --git a/utils/move_B.txt b/utils/move_15_B.txt diff --git a/utils/move_B2.txt b/utils/move_16_B2.txt diff --git a/utils/move_B3.txt b/utils/move_17_B3.txt diff --git a/utils/transform_00_UFr.txt b/utils/transform_00_UFr.txt @@ -0,0 +1 @@ +UF0 UB0 DB0 DF0 UR0 UL0 DL0 DR0 FR0 FL0 BL0 BR0 UFR0 UBL0 DFL0 DBR0 UFL0 UBR0 DFR0 DBL0 diff --git a/utils/transform_01_ULr.txt b/utils/transform_01_ULr.txt @@ -0,0 +1 @@ +UL0 UR0 DR0 DL0 UF0 UB0 DB0 DF0 FL1 BL1 BR1 FR1 UFL0 UBR0 DBL0 DFR0 UBL0 UFR0 DFL0 DBR0 diff --git a/utils/transform_02_UBr.txt b/utils/transform_02_UBr.txt @@ -0,0 +1 @@ +UB0 UF0 DF0 DB0 UL0 UR0 DR0 DL0 BL0 BR0 FR0 FL0 UBL0 UFR0 DBR0 DFL0 UBR0 UFL0 DBL0 DFR0 diff --git a/utils/transform_03_URr.txt b/utils/transform_03_URr.txt @@ -0,0 +1 @@ +UR0 UL0 DL0 DR0 UB0 UF0 DF0 DB0 BR1 FR1 FL1 BL1 UBR0 UFL0 DFR0 DBL0 UFR0 UBL0 DBR0 DFL0 diff --git a/utils/transform_04_DFr.txt b/utils/transform_04_DFr.txt @@ -0,0 +1 @@ +DF0 DB0 UB0 UF0 DL0 DR0 UR0 UL0 FL0 FR0 BR0 BL0 DFL0 DBR0 UFR0 UBL0 DFR0 DBL0 UFL0 UBR0 diff --git a/utils/transform_05_DLr.txt b/utils/transform_05_DLr.txt @@ -0,0 +1 @@ +DL0 DR0 UR0 UL0 DB0 DF0 UF0 UB0 BL1 FL1 FR1 BR1 DBL0 DFR0 UFL0 UBR0 DFL0 DBR0 UBL0 UFR0 diff --git a/utils/transform_06_DBr.txt b/utils/transform_06_DBr.txt @@ -0,0 +1 @@ +DB0 DF0 UF0 UB0 DR0 DL0 UL0 UR0 BR0 BL0 FL0 FR0 DBR0 DFL0 UBL0 UFR0 DBL0 DFR0 UBR0 UFL0 diff --git a/utils/transform_07_DRr.txt b/utils/transform_07_DRr.txt @@ -0,0 +1 @@ +DR0 DL0 UL0 UR0 DF0 DB0 UB0 UF0 FR1 BR1 BL1 FL1 DFR0 DBL0 UBR0 UFL0 DBR0 DFL0 UFR0 UBL0 diff --git a/utils/transform_08_RUr.txt b/utils/transform_08_RUr.txt @@ -0,0 +1 @@ +UR1 DR1 DL1 UL1 FR1 BR1 BL1 FL1 UF0 UB0 DB0 DF0 UFR2 DBR2 UBL2 DFL2 UBR1 DFR1 UFL1 DBL1 diff --git a/utils/transform_09_RFr.txt b/utils/transform_09_RFr.txt @@ -0,0 +1 @@ +FR1 BR1 BL1 FL1 DR1 UR1 UL1 DL1 DF1 UF1 UB1 DB1 DFR1 UBR1 UFL1 DBL1 UFR2 DBR2 DFL2 UBL2 diff --git a/utils/transform_10_RDr.txt b/utils/transform_10_RDr.txt @@ -0,0 +1 @@ +DR1 UR1 UL1 DL1 BR1 FR1 FL1 BL1 DB0 DF0 UF0 UB0 DBR2 UFR2 DFL2 UBL2 DFR1 UBR1 DBL1 UFL1 diff --git a/utils/transform_11_RBr.txt b/utils/transform_11_RBr.txt @@ -0,0 +1 @@ +BR1 FR1 FL1 BL1 UR1 DR1 DL1 UL1 UB1 DB1 DF1 UF1 UBR1 DFR1 DBL1 UFL1 DBR2 UFR2 UBL2 DFL2 diff --git a/utils/transform_12_LUr.txt b/utils/transform_12_LUr.txt @@ -0,0 +1 @@ +UL1 DL1 DR1 UR1 BL1 FL1 FR1 BR1 UB0 UF0 DF0 DB0 UBL2 DFL2 UFR2 DBR2 UFL1 DBL1 UBR1 DFR1 diff --git a/utils/transform_13_LFr.txt b/utils/transform_13_LFr.txt @@ -0,0 +1 @@ +FL1 BL1 BR1 FR1 UL1 DL1 DR1 UR1 UF1 DF1 DB1 UB1 UFL1 DBL1 DFR1 UBR1 DFL2 UBL2 UFR2 DBR2 diff --git a/utils/transform_14_LDr.txt b/utils/transform_14_LDr.txt @@ -0,0 +1 @@ +DL1 UL1 UR1 DR1 FL1 BL1 BR1 FR1 DF0 DB0 UB0 UF0 DFL2 UBL2 DBR2 UFR2 DBL1 UFL1 DFR1 UBR1 diff --git a/utils/transform_15_LBr.txt b/utils/transform_15_LBr.txt @@ -0,0 +1 @@ +BL1 FL1 FR1 BR1 DL1 UL1 UR1 DR1 DB1 UB1 UF1 DF1 DBL1 UFL1 UBR1 DFR1 UBL2 DFL2 DBR2 UFR2 diff --git a/utils/transform_16_FUr.txt b/utils/transform_16_FUr.txt @@ -0,0 +1 @@ +UF1 DF1 DB1 UB1 FL0 FR0 BR0 BL0 UL0 UR0 DR0 DL0 UFL2 DFR2 UBR2 DBL2 UFR1 DFL1 UBL1 DBR1 diff --git a/utils/transform_17_FRr.txt b/utils/transform_17_FRr.txt @@ -0,0 +1 @@ +FR0 FL0 BL0 BR0 UF1 DF1 DB1 UB1 UR1 DR1 DL1 UL1 UFR1 DFL1 DBR1 UBL1 DFR2 UFL2 UBR2 DBL2 diff --git a/utils/transform_18_FDr.txt b/utils/transform_18_FDr.txt @@ -0,0 +1 @@ +DF1 UF1 UB1 DB1 FR0 FL0 BL0 BR0 DR0 DL0 UL0 UR0 DFR2 UFL2 DBL2 UBR2 DFL1 UFR1 DBR1 UBL1 diff --git a/utils/transform_19_FLr.txt b/utils/transform_19_FLr.txt @@ -0,0 +1 @@ +FL0 FR0 BR0 BL0 DF1 UF1 UB1 DB1 DL1 UL1 UR1 DR1 DFL1 UFR1 UBL1 DBR1 UFL2 DFR2 DBL2 UBR2 diff --git a/utils/transform_20_BUr.txt b/utils/transform_20_BUr.txt @@ -0,0 +1 @@ +UB1 DB1 DF1 UF1 BR0 BL0 FL0 FR0 UR0 UL0 DL0 DR0 UBR2 DBL2 UFL2 DFR2 UBL1 DBR1 UFR1 DFL1 diff --git a/utils/transform_21_BRr.txt b/utils/transform_21_BRr.txt @@ -0,0 +1 @@ +BR0 BL0 FL0 FR0 DB1 UB1 UF1 DF1 DR1 UR1 UL1 DL1 DBR1 UBL1 UFR1 DFL1 UBR2 DBL2 DFR2 UFL2 diff --git a/utils/transform_22_BDr.txt b/utils/transform_22_BDr.txt @@ -0,0 +1 @@ +DB1 UB1 UF1 DF1 BL0 BR0 FR0 FL0 DL0 DR0 UR0 UL0 DBL2 UBR2 DFR2 UFL2 DBR1 UBL1 DFL1 UFR1 diff --git a/utils/transform_23_BLr.txt b/utils/transform_23_BLr.txt @@ -0,0 +1 @@ +BL0 BR0 FR0 FL0 UB1 DB1 DF1 UF1 UL1 DL1 DR1 UR1 UBL1 DBR1 DFL1 UFR1 DBL2 UBR2 UFL2 DFR2 diff --git a/utils/transform_24_UFm.txt b/utils/transform_24_UFm.txt @@ -0,0 +1 @@ +UF0 UB0 DB0 DF0 UL0 UR0 DR0 DL0 FL0 FR0 BR0 BL0 UFL0 UBR0 DFR0 DBL0 UFR0 UBL0 DFL0 DBR0 diff --git a/utils/transform_25_ULm.txt b/utils/transform_25_ULm.txt @@ -0,0 +1 @@ +UR0 UL0 DL0 DR0 UF0 UB0 DB0 DF0 FR1 BR1 BL1 FL1 UFR0 UBL0 DBR0 DFL0 UBR0 UFL0 DFR0 DBL0 diff --git a/utils/transform_26_UBm.txt b/utils/transform_26_UBm.txt @@ -0,0 +1 @@ +UB0 UF0 DF0 DB0 UR0 UL0 DL0 DR0 BR0 BL0 FL0 FR0 UBR0 UFL0 DBL0 DFR0 UBL0 UFR0 DBR0 DFL0 diff --git a/utils/transform_27_URm.txt b/utils/transform_27_URm.txt @@ -0,0 +1 @@ +UL0 UR0 DR0 DL0 UB0 UF0 DF0 DB0 BL1 FL1 FR1 BR1 UBL0 UFR0 DFL0 DBR0 UFL0 UBR0 DBL0 DFR0 diff --git a/utils/transform_28_DFm.txt b/utils/transform_28_DFm.txt @@ -0,0 +1 @@ +DF0 DB0 UB0 UF0 DR0 DL0 UL0 UR0 FR0 FL0 BL0 BR0 DFR0 DBL0 UFL0 UBR0 DFL0 DBR0 UFR0 UBL0 diff --git a/utils/transform_29_DLm.txt b/utils/transform_29_DLm.txt @@ -0,0 +1 @@ +DR0 DL0 UL0 UR0 DB0 DF0 UF0 UB0 BR1 FR1 FL1 BL1 DBR0 DFL0 UFR0 UBL0 DFR0 DBL0 UBR0 UFL0 diff --git a/utils/transform_30_DBm.txt b/utils/transform_30_DBm.txt @@ -0,0 +1 @@ +DB0 DF0 UF0 UB0 DL0 DR0 UR0 UL0 BL0 BR0 FR0 FL0 DBL0 DFR0 UBR0 UFL0 DBR0 DFL0 UBL0 UFR0 diff --git a/utils/transform_31_DRm.txt b/utils/transform_31_DRm.txt @@ -0,0 +1 @@ +DL0 DR0 UR0 UL0 DF0 DB0 UB0 UF0 FL1 BL1 BR1 FR1 DFL0 DBR0 UBL0 UFR0 DBL0 DFR0 UFL0 UBR0 diff --git a/utils/transform_32_RUm.txt b/utils/transform_32_RUm.txt @@ -0,0 +1 @@ +UL1 DL1 DR1 UR1 FL1 BL1 BR1 FR1 UF0 UB0 DB0 DF0 UFL2 DBL2 UBR2 DFR2 UBL1 DFL1 UFR1 DBR1 diff --git a/utils/transform_33_RFm.txt b/utils/transform_33_RFm.txt @@ -0,0 +1 @@ +FL1 BL1 BR1 FR1 DL1 UL1 UR1 DR1 DF1 UF1 UB1 DB1 DFL1 UBL1 UFR1 DBR1 UFL2 DBL2 DFR2 UBR2 diff --git a/utils/transform_34_RDm.txt b/utils/transform_34_RDm.txt @@ -0,0 +1 @@ +DL1 UL1 UR1 DR1 BL1 FL1 FR1 BR1 DB0 DF0 UF0 UB0 DBL2 UFL2 DFR2 UBR2 DFL1 UBL1 DBR1 UFR1 diff --git a/utils/transform_35_RBm.txt b/utils/transform_35_RBm.txt @@ -0,0 +1 @@ +BL1 FL1 FR1 BR1 UL1 DL1 DR1 UR1 UB1 DB1 DF1 UF1 UBL1 DFL1 DBR1 UFR1 DBL2 UFL2 UBR2 DFR2 diff --git a/utils/transform_36_LUm.txt b/utils/transform_36_LUm.txt @@ -0,0 +1 @@ +UR1 DR1 DL1 UL1 BR1 FR1 FL1 BL1 UB0 UF0 DF0 DB0 UBR2 DFR2 UFL2 DBL2 UFR1 DBR1 UBL1 DFL1 diff --git a/utils/transform_37_LFm.txt b/utils/transform_37_LFm.txt @@ -0,0 +1 @@ +FR1 BR1 BL1 FL1 UR1 DR1 DL1 UL1 UF1 DF1 DB1 UB1 UFR1 DBR1 DFL1 UBL1 DFR2 UBR2 UFL2 DBL2 diff --git a/utils/transform_38_LDm.txt b/utils/transform_38_LDm.txt @@ -0,0 +1 @@ +DR1 UR1 UL1 DL1 FR1 BR1 BL1 FL1 DF0 DB0 UB0 UF0 DFR2 UBR2 DBL2 UFL2 DBR1 UFR1 DFL1 UBL1 diff --git a/utils/transform_39_LBm.txt b/utils/transform_39_LBm.txt @@ -0,0 +1 @@ +BR1 FR1 FL1 BL1 DR1 UR1 UL1 DL1 DB1 UB1 UF1 DF1 DBR1 UFR1 UBL1 DFL1 UBR2 DFR2 DBL2 UFL2 diff --git a/utils/transform_40_FUm.txt b/utils/transform_40_FUm.txt @@ -0,0 +1 @@ +UF1 DF1 DB1 UB1 FR0 FL0 BL0 BR0 UR0 UL0 DL0 DR0 UFR2 DFL2 UBL2 DBR2 UFL1 DFR1 UBR1 DBL1 diff --git a/utils/transform_41_FRm.txt b/utils/transform_41_FRm.txt @@ -0,0 +1 @@ +FL0 FR0 BR0 BL0 UF1 DF1 DB1 UB1 UL1 DL1 DR1 UR1 UFL1 DFR1 DBL1 UBR1 DFL2 UFR2 UBL2 DBR2 diff --git a/utils/transform_42_FDm.txt b/utils/transform_42_FDm.txt @@ -0,0 +1 @@ +DF1 UF1 UB1 DB1 FL0 FR0 BR0 BL0 DL0 DR0 UR0 UL0 DFL2 UFR2 DBR2 UBL2 DFR1 UFL1 DBL1 UBR1 diff --git a/utils/transform_43_FLm.txt b/utils/transform_43_FLm.txt @@ -0,0 +1 @@ +FR0 FL0 BL0 BR0 DF1 UF1 UB1 DB1 DR1 UR1 UL1 DL1 DFR1 UFL1 UBR1 DBL1 UFR2 DFL2 DBR2 UBL2 diff --git a/utils/transform_44_BUm.txt b/utils/transform_44_BUm.txt @@ -0,0 +1 @@ +UB1 DB1 DF1 UF1 BL0 BR0 FR0 FL0 UL0 UR0 DR0 DL0 UBL2 DBR2 UFR2 DFL2 UBR1 DBL1 UFL1 DFR1 diff --git a/utils/transform_45_BRm.txt b/utils/transform_45_BRm.txt @@ -0,0 +1 @@ +BL0 BR0 FR0 FL0 DB1 UB1 UF1 DF1 DL1 UL1 UR1 DR1 DBL1 UBR1 UFL1 DFR1 UBL2 DBR2 DFL2 UFR2 diff --git a/utils/transform_46_BDm.txt b/utils/transform_46_BDm.txt @@ -0,0 +1 @@ +DB1 UB1 UF1 DF1 BR0 BL0 FL0 FR0 DR0 DL0 UL0 UR0 DBR2 UBL2 DFL2 UFR2 DBL1 UBR1 DFR1 UFL1 diff --git a/utils/transform_47_BLm.txt b/utils/transform_47_BLm.txt @@ -0,0 +1 @@ +BR0 BL0 FL0 FR0 UB1 DB1 DF1 UF1 UR1 DR1 DL1 UL1 UBR1 DBL1 DFR1 UFL1 DBR2 UBL2 UFR2 DFL2