(* Content-type: application/vnd.wolfram.cdf.text *) (*** Wolfram CDF File ***) (* http://www.wolfram.com/cdf *) (* CreatedBy='Mathematica 10.1' *) (*************************************************************************) (* *) (* The Mathematica License under which this file was created prohibits *) (* restricting third parties in receipt of this file from republishing *) (* or redistributing it by any means, including but not limited to *) (* rights management or terms of use, without the express consent of *) (* Wolfram Research, Inc. For additional information concerning CDF *) (* licensing and redistribution see: *) (* *) (* www.wolfram.com/cdf/adopting-cdf/licensing-options.html *) (* *) (*************************************************************************) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 1064, 20] NotebookDataLength[ 371109, 7012] NotebookOptionsPosition[ 371545, 7005] NotebookOutlinePosition[ 372111, 7027] CellTagsIndexPosition[ 372068, 7024] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`cvAbortFlag$$ = False, $CellContext`cvAngleix$$ = 2, $CellContext`cvAnimOpt$$ = 3, $CellContext`cvBkgdColor$$ = GrayLevel[ 0.85], $CellContext`cvClearHist$$ = False, $CellContext`cvCubeState$$ = {{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, { 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}}, $CellContext`cvCurrAxisXYZ$$ = 1, $CellContext`cvCurrLayerListXYZ$$ = {}, $CellContext`cvCurrMove$$ = { 7, {2}, 4}, $CellContext`cvDbgPause$$ = False, $CellContext`cvEdgeColor$$ = GrayLevel[ 0], $CellContext`cvEdgeTh$$ = 4, $CellContext`cvFaceC1$$ = RGBColor[ 1, 1, 0], $CellContext`cvFaceC2$$ = RGBColor[ 1, 0, 0], $CellContext`cvFaceC3$$ = RGBColor[ 0, 0, 1], $CellContext`cvFaceC4$$ = RGBColor[ 0.29, 0.47, 0.48], $CellContext`cvFaceC5$$ = RGBColor[ 0.8, 0.6, 0], $CellContext`cvFaceC6$$ = RGBColor[ 1, 1, 1], $CellContext`cvForceRings$$ = False, $CellContext`cvFreeze$$ = False, $CellContext`cvIxUds$$ = 1, $CellContext`cvMoveIsNormal$$ = True, $CellContext`cvMoves$$ = {}, $CellContext`cvMovesIx$$ = 1, $CellContext`cvNumHist$$ = 5, $CellContext`cvNumMoves$$ = 0, $CellContext`cvNumSteps$$ = 6, $CellContext`cvNumStepsNext$$ = 6, $CellContext`cvNx$$ = 5, $CellContext`cvOldNx$$ = 5, $CellContext`cvReady$$ = True, $CellContext`cvRecOn$$ = False, $CellContext`cvRevSeqs$$ = False, $CellContext`cvRingColor$$ = RGBColor[0.94, 0.88, 0.94], $CellContext`cvRingTh$$ = 3, $CellContext`cvRotAngle$$ = 0., $CellContext`cvRotating$$ = False, $CellContext`cvSelectedFace$$ = 4, $CellContext`cvSelectedLayersFRU$$ = {}, $CellContext`cvSeqAnimOn$$ = True, $CellContext`cvSeqDesc$$ = "Scramble/Solve (100)", $CellContext`cvShowCores$$ = False, $CellContext`cvShowFrames$$ = False, $CellContext`cvShowMisAl3$$ = 1, $CellContext`cvShowRings$$ = True, $CellContext`cvShowRingsTemp$$ = True, $CellContext`cvSolvedOri$$ = 1, $CellContext`cvSubcubeSize$$ = 75, $CellContext`cvTurnix$$ = 11, $CellContext`cvUdsDeleteOK$$ = False, $CellContext`cvUdsExecuteOK$$ = False, $CellContext`cvUdsOverwriteOK$$ = False, $CellContext`cvUdsSaveOK$$ = False, $CellContext`cvViewOpt$$ = 1, $CellContext`cvViewPtAngle$$ = {0.7853981633974483, 0.9553166181245093}, $CellContext`cvViewPtMult$$ = 3., $CellContext`cvWindowWidth$$ = 320, $CellContext`cvWireFrame$$ = True, $CellContext`cvXInvis$$ = {}, $CellContext`cvYInvis$$ = {}, \ $CellContext`cvZInvis$$ = {}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`cvAngleix$$], 1, ""}}, {{ Hold[$CellContext`cvAnimOpt$$], 1, ""}}, {{ Hold[$CellContext`cvAbortFlag$$], False, ""}}, {{ Hold[$CellContext`cvBkgdColor$$], GrayLevel[0.85], ""}}, {{ Hold[$CellContext`cvClearHist$$], False, ""}}, {{ Hold[$CellContext`cvCubeState$$], {{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, { 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, { 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{ 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}}, ""}}, {{ Hold[$CellContext`cvCurrAxisXYZ$$], 1, ""}}, {{ Hold[$CellContext`cvCurrLayerListXYZ$$], {}, ""}}, {{ Hold[$CellContext`cvCurrMove$$], {}, ""}}, {{ Hold[$CellContext`cvDbgPause$$], False, ""}}, {{ Hold[$CellContext`cvEdgeColor$$], GrayLevel[0], ""}}, {{ Hold[$CellContext`cvEdgeTh$$], 4, ""}}, {{ Hold[$CellContext`cvFaceC1$$], RGBColor[1, 1, 0], ""}}, {{ Hold[$CellContext`cvFaceC2$$], RGBColor[1, 0, 0], ""}}, {{ Hold[$CellContext`cvFaceC3$$], RGBColor[0, 0, 1], ""}}, {{ Hold[$CellContext`cvFaceC4$$], RGBColor[0.29, 0.47, 0.48], ""}}, {{ Hold[$CellContext`cvFaceC5$$], RGBColor[0.8, 0.6, 0], ""}}, {{ Hold[$CellContext`cvFaceC6$$], RGBColor[1, 1, 1], ""}}, {{ Hold[$CellContext`cvFreeze$$], False, ""}}, {{ Hold[$CellContext`cvForceRings$$], False, ""}}, {{ Hold[$CellContext`cvIxUds$$], 1, ""}}, {{ Hold[$CellContext`cvMoveIsNormal$$], True, ""}}, {{ Hold[$CellContext`cvMoves$$], {}, ""}}, {{ Hold[$CellContext`cvMovesIx$$], 1, ""}}, {{ Hold[$CellContext`cvNumHist$$], 5, ""}}, {{ Hold[$CellContext`cvNumMoves$$], 0, ""}}, {{ Hold[$CellContext`cvNumSteps$$], 3, ""}}, {{ Hold[$CellContext`cvNumStepsNext$$], 3, ""}}, {{ Hold[$CellContext`cvNx$$], 5, ""}}, {{ Hold[$CellContext`cvOldNx$$], -1, ""}}, {{ Hold[$CellContext`cvReady$$], True, ""}}, {{ Hold[$CellContext`cvRecOn$$], False, ""}}, {{ Hold[$CellContext`cvRevSeqs$$], False, ""}}, {{ Hold[$CellContext`cvRingColor$$], RGBColor[0.94, 0.88, 0.94], ""}}, {{ Hold[$CellContext`cvRingTh$$], 3, ""}}, {{ Hold[$CellContext`cvRotAngle$$], 0., ""}}, {{ Hold[$CellContext`cvRotating$$], False, ""}}, {{ Hold[$CellContext`cvSelectedFace$$], 4, ""}}, {{ Hold[$CellContext`cvSelectedLayersFRU$$], {}, ""}}, {{ Hold[$CellContext`cvSeqAnimOn$$], True, ""}}, {{ Hold[$CellContext`cvSeqDesc$$], "None", ""}}, {{ Hold[$CellContext`cvShowCores$$], False, ""}}, {{ Hold[$CellContext`cvShowFrames$$], False, ""}}, {{ Hold[$CellContext`cvShowMisAl3$$], 1, ""}}, {{ Hold[$CellContext`cvShowRings$$], True, ""}}, {{ Hold[$CellContext`cvShowRingsTemp$$], True, ""}}, {{ Hold[$CellContext`cvSolvedOri$$], 1, ""}}, {{ Hold[$CellContext`cvSubcubeSize$$], 75, ""}}, {{ Hold[$CellContext`cvTurnix$$], 0, ""}}, {{ Hold[$CellContext`cvUdsDeleteOK$$], False, ""}}, {{ Hold[$CellContext`cvUdsExecuteOK$$], False, ""}}, {{ Hold[$CellContext`cvUdsOverwriteOK$$], False, ""}}, {{ Hold[$CellContext`cvUdsSaveOK$$], False, ""}}, {{ Hold[$CellContext`cvViewPtAngle$$], {0.7853981633974483, 0.9553166181245093}, ""}}, {{ Hold[$CellContext`cvViewOpt$$], 1, ""}}, {{ Hold[$CellContext`cvViewPtMult$$], 3., ""}}, {{ Hold[$CellContext`cvWindowWidth$$], 320, ""}}, {{ Hold[$CellContext`cvWireFrame$$], False, ""}}, {{ Hold[$CellContext`cvXInvis$$], {}, ""}}, {{ Hold[$CellContext`cvYInvis$$], {}, ""}}, {{ Hold[$CellContext`cvZInvis$$], {}, ""}}, { Hold[ Item[ Row[{ Framed[ Grid[{{ Button[ Tooltip[ " solved cube ", "Reset the cube to a pristine state.\n(Does not erase move \ history.)"], $CellContext`cvCubeState$$ = \ $CellContext`solvedCube[$CellContext`cvNx$$, $CellContext`cvSolvedOri$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Null, Enabled -> $CellContext`cvReady$$, ImageSize -> Automatic], SpanFromLeft}, { Tooltip[ Style["cube length:", 14, Bold, GrayLevel[0]], "Number of subcubes per side"], Tooltip[ Control[{$CellContext`cvNx$$, 1, $CellContext`gcMaxCubeLength, 1, ControlType -> PopupMenu, Enabled -> $CellContext`cvReady$$}], " **** WARNING ****\n Changing the cube length \ resets the cube to \n a solved state, erases your move history and \n \ deletes all your user-defined sequences."]}}], Background -> RGBColor[0.92, 0.88, 0.8400000000000001], FrameMargins -> {{10, 10}, {6, 6}}], Framed[ Column[{ Tooltip[ Style["animation", 14, Bold, GrayLevel[0]], "Configure animation of rotating layers."], Row[{Column[{ Tooltip[ Style["steps", 12, Bold, GrayLevel[0]], "Choose the number of animation steps per quarter turn."], Control[{$CellContext`cvNumStepsNext$$, Range[8], ControlType -> PopupMenu, ImageMargins -> {{4, 6}, {0, 0}}}]}, Center] Spacer[3], Column[{ Tooltip[ Style["seq anim", 12, Bold, GrayLevel[0]], "Enable/disable sequence animation."], Control[{$CellContext`cvSeqAnimOn$$, {True -> Tooltip[ Style["on", 14], "Turn sequence animation ON."], False -> Tooltip[ Style["off", 14], "Turn sequence animation OFF."]}, ControlType -> SetterBar}]}, Center] Spacer[3]}]}, Center], Background -> RGBColor[1, 0.9, 0.8], FrameMargins -> {{5, 5}, {5, 5}}], Framed[ Column[{ Row[{ Tooltip[ Style["sequences & patterns", 14, Bold, GrayLevel[0]], "Useful and interesting move sequences. The resulting\n\ patterns of most of these may be affected by choices of\nFace and Layers in \ the Basic Moves panel."], Control[{$CellContext`cvRevSeqs$$, {False -> Tooltip[ Style["forward", 12], "Execute sequences forward."], True -> Tooltip[ Style["reverse", 12], "Execute sequences in reverse."]}, ControlType -> SetterBar, Enabled -> $CellContext`cvReady$$}], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]]}, Spacer[10]], Row[{ ActionMenu[ Tooltip[ "corners", "Sequences affecting only corner subcubes."], { "Flip2AdjacentCorners" :> $CellContext`doSeqNamed[ "Flip2AdjacentCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2FaceDiagCorners" :> $CellContext`doSeqNamed[ "Flip2FaceDiagCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2CubeDiagCorners" :> $CellContext`doSeqNamed[ "Flip2CubeDiagCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Swap3Corners" :> $CellContext`doSeqNamed[ "Swap3Corners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip["edges", "Sequences affecting only edge subcubes."], { "Swap3Edges8Moves" :> $CellContext`doSeqNamed[ "Swap3Edges8Moves", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameFaceNoFlip" :> $CellContext`doSeqNamed[ "Swap3EdgesSameFaceNoFlip", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameFaceFlip2" :> $CellContext`doSeqNamed[ "Swap3EdgesSameFaceFlip2", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameCorner" :> $CellContext`doSeqNamed[ "Swap3EdgesSameCorner", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameCornerAlt" :> $CellContext`doSeqNamed[ "Swap3EdgesSameCornerAlt", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Flip2EdgesInPlace" :> $CellContext`doSeqNamed[ "Flip2EdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip4EdgesInPlace" :> $CellContext`doSeqNamed[ "Flip4EdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "FlipAllEdgesInPlace" :> $CellContext`doSeqNamed[ "FlipAllEdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Swap2Edges" :> $CellContext`doSeqNamed[ "Swap2Edges", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap4Edges" :> $CellContext`doSeqNamed[ "Swap4Edges", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip["patterns", "Interesting patterns."], { "Dots" :> $CellContext`doSeqNamed[ "Dots", $CellContext`cvNx$$, $CellContext`cvSelectedFace$$, \ $CellContext`cvSelectedLayersFRU$$, $CellContext`cvRevSeqs$$], "Checkers" :> $CellContext`doSeqNamed[ "Checkers", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Ripple" :> $CellContext`doSeqNamed[ "Ripple", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "MultiRipple" :> $CellContext`doSeqNamed[ "MultiRipple", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "RotateMidFaces180Deg" :> $CellContext`doSeqNamed[ "RotateMidFaces180Deg", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "RotateCore180Deg" :> $CellContext`doSeqNamed[ "RotateCore180Deg", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2BigCorners" :> $CellContext`doSeqNamed[ "Flip2BigCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip[ "random", "Random sequences for scrambling the cube."], { "Scramble 10" :> $CellContext`doSeqNamed[ "Scramble 10", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble 20" :> $CellContext`doSeqNamed[ "Scramble 20", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble 100" :> $CellContext`doSeqNamed[ "Scramble 100", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Scramble/Solve 10" :> $CellContext`doSeqNamed[ "Scramble/Solve 10", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble/Solve 20" :> $CellContext`doSeqNamed[ "Scramble/Solve 20", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble/Solve 100" :> $CellContext`doSeqNamed[ "Scramble/Solve 100", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip[ "demos", " Demos illustrating some DeepCube features. \n (Best \ results with cube length = 4, 5, or 6.) "], { "View Options" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "View Options", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Subcube Sizes" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Subcube Sizes", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "Face Colors" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Face Colors", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Edges Colors/Styles" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Edges Colors/Styles", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Rings Colors/Styles" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Rings Colors/Styles", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Background Colors" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Background Colors", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "Invisible Layers" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Invisible Layers", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Show Misaligned" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Show Misaligned", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Perspective" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Perspective", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Animation Steps" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Animation Steps", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "All Demos" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "All Demos", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$])}, Enabled -> $CellContext`cvReady$$]}, Spacer[5]]}, Center], Background -> RGBColor[1, 1, 0.95], FrameMargins -> {{10, 10}, {6, 6}}], Framed[ Column[{ Tooltip[ Style["view options", 14, GrayLevel[0], Bold], "Choose front/back views and visibility of inner cores."], Row[{ Control[{$CellContext`cvViewOpt$$, { 1 -> "front view", 2 -> "back view", 3 -> "both"}, ControlType -> RadioButtonBar, Appearance -> "Vertical"}], Column[{ Style["show\ncores", LineSpacing -> {0.8, 0}], Control[{$CellContext`cvShowCores$$, {True, False}}]}, Center]}, Spacer[20]]}, Center], Background -> RGBColor[1., 0.925, 0.85], FrameMargins -> {{10, 10}, {6, 6}}]}, Spacer[8], Alignment -> {Center, Center}]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ Row[{ Row[{ Tooltip[ " display width ", "Adjust the width of the cube display window."], Control[{$CellContext`cvWindowWidth$$, 200, 500, 10, ControlType -> Slider, Appearance -> "Labeled", ImageSize -> 150}], Tooltip[ " subcube size ", "Adjust the subecube size.\n(Smaller sizes let you see past the \ exterior subcubes into the interior.)"], Control[{$CellContext`cvSubcubeSize$$, \ $CellContext`gcMinSubcubeSize, $CellContext`gcMaxSubcubeSize, 1, ControlType -> Slider, Appearance -> "Labeled", ImageMargins -> {{0, 0}, {0, 0}}, ImageSize -> 150}]}]}]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ OpenerView[{ Tooltip[ Style["subcube colors ", 14, Bold, RGBColor[0, 0, 1]], "Modify subcube face colors."], Column[{ Framed[ Grid[{{ Tooltip[ Style["color schemes", 14, Bold, GrayLevel[0]], "Choose random or specific color schemes."], SpanFromLeft, SpanFromLeft}, { Button[ Tooltip[ "def", "Reset to default colors."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-1], ImageMargins -> 1], Button[ Tooltip[ "rnd", "Color subcube faces randomly."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-2], ImageMargins -> 1], ActionMenu[ Tooltip["alt", "Choose a color scheme from a list."], {Row[{ RGBColor[0., 1., 1.], RGBColor[1., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[0., 0.8, 0.5], RGBColor[0.7000000000000001, 0.8, 0.], RGBColor[ 0.5, 0.5, 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[61]), Row[{ RGBColor[0., 0., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[1., 1., 1.], RGBColor[0., 1., 1.], RGBColor[0., 1., 0.], RGBColor[ 0., 0., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[62]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 0., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0., 1.], RGBColor[ 1., 1., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[63]), Row[{ RGBColor[0.2, 1., 1.], RGBColor[0.2, 0.8, 1.], RGBColor[0.2, 0.6000000000000001, 0.2], RGBColor[0.2, 0.30000000000000004`, 0.6000000000000001], RGBColor[0.2, 1., 0.2], RGBColor[ 0.2, 0., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[64]), Row[{ RGBColor[0.5, 0., 0.], RGBColor[0.5, 0.5, 1.], RGBColor[0.5, 0., 1.], RGBColor[0.5, 0.5, 0.], RGBColor[0.5, 1., 1.], RGBColor[ 0.5, 1., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[65]), Row[{ RGBColor[1., 0., 0.], RGBColor[1., 0., 0.8], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[1., 1., 1.], RGBColor[ 0.2, 0.4, 0.6000000000000001]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[66]), Row[{ RGBColor[0., 0.8, 0.], RGBColor[1., 1., 0.], RGBColor[1., 0., 0.], RGBColor[0., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[ 0., 0., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[67]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[ 1., 1., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[68]), Row[{ RGBColor[1., 0.2, 0.2], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[0.6000000000000001, 0.9, 0.6000000000000001], RGBColor[0.7000000000000001, 0.7000000000000001, 1.], RGBColor[ 0.8, 0., 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[69]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[1., 0.8, 0.8], RGBColor[0.8, 1., 0.8], RGBColor[ 0.8, 0.8, 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[70]), Row[{ RGBColor[0., 0.9, 0.9], RGBColor[1., 0., 1.], RGBColor[1., 1., 0.], RGBColor[0.9, 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[ 1., 1., 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[71]), Row[{ RGBColor[0.8, 0., 0.], RGBColor[0., 0.8, 0.], RGBColor[0., 0., 0.8], RGBColor[0.7000000000000001, 0.5, 0.2], RGBColor[0.7000000000000001, 1., 0.7000000000000001], RGBColor[ 0.6000000000000001, 0.6000000000000001, 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[72])}, ImageMargins -> 1]}}, Spacings -> {0, 0.2}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> 4], Framed[ Grid[{{ Tooltip[ Style["face colors", 14, Bold, GrayLevel[0]], "Choose colors for subcube faces.\n(Click on a color to \ change it.)\nNote: F, R,U, etc. refer to faces\nin the \"solved cube\" \ orientation."], SpanFromLeft, SpanFromLeft}, {"F", "R", "U"}, { Framed[ Control[{$CellContext`cvFaceC1$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC2$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC3$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0]}, { Framed[ Control[{$CellContext`cvFaceC4$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC5$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC6$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0]}, {"B", "L", "D"}}, Alignment -> {Center, Center}, Background -> GrayLevel[0.9], Spacings -> {1., 0.3}], Background -> GrayLevel[0.9], FrameMargins -> {{5, 5}, {4, 4}}], Framed[ Grid[{{ Tooltip[ Style["permute colors", 14, Bold, GrayLevel[0]], "Rearrange current colors."], SpanFromLeft}, { Button[ Tooltip[ "rnd", "Randomly permute current colors."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-5, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "cw", "Cycle clockwise."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-6, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "ccw", "Cycle counterclockwise."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-7, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "\[UpDownArrow]", "Swap top & bottom rows."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-8, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "\[RightArrow]", "Swap columns cyclically."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-9, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1]}}, Alignment -> {Center, Center}, Spacings -> {0., 0.3}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> {{2, 2}, {2, 2}}]}, Center]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ OpenerView[{ Tooltip[ Style["other colors", 14, Bold, RGBColor[0, 0, 1]], "Modify colors/styles for rings, background, etc."], Column[{ Framed[ Grid[{{ Tooltip[ Style["edges", 11], "Choose a color for the subcube edges."], Tooltip[ Style["rings", 11], "Choose a color for the layer-indicator rings."], Tooltip[ Style["bkgd", 11], "Choose a background color for the cube display."]}, { Framed[ Control[{$CellContext`cvEdgeColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvRingColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvBkgdColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0]}}, Alignment -> {Center, Center}, Background -> GrayLevel[0.9], Spacings -> {0.6, 0.4}], Background -> GrayLevel[0.9], FrameMargins -> {{10, 10}, {4, 4}}], Framed[ Grid[{{"thicknesses", SpanFromLeft, Null}, { Control[{$CellContext`cvEdgeTh$$, 0, 10, 1, ControlType -> PopupMenu}], Control[{$CellContext`cvRingTh$$, 0, 7, 1, ControlType -> PopupMenu}]}, { Tooltip[ Style["edges", 11], "Choose a thickness for subcube edges."], Tooltip[ Style["rings", 11], "Choose a thickness for layer-indicator rings"], Null}}, Alignment -> {Center, Center}, Spacings -> {0.5, 0.3}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> {{10, 0}, {4, 4}}], Button[ Tooltip[ "defaults", "Reset thicknesses & colors to default values."], \ {$CellContext`cvEdgeTh$$, $CellContext`cvRingTh$$, \ $CellContext`cvEdgeColor$$, $CellContext`cvRingColor$$, \ $CellContext`cvBkgdColor$$} = {$CellContext`gcDfltEdgeTh, \ $CellContext`gcDfltRingTh, $CellContext`gcDfltEdgeColor, \ $CellContext`gcDfltRingColor, $CellContext`gcDfltBkgdColor}; Null, ImageSize -> {80, Automatic}]}, Center]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ OpenerView[{ Tooltip[ Style["perspective", 14, Bold, RGBColor[0, 0, 1]], "Adjust viewpoint angles and perspective."], Grid[{{ Tooltip["view angle", "Change viewing angle."], Tooltip["dist", "Change viewing distance."]}, { Control[{$CellContext`cvViewPtAngle$$, \ $CellContext`gcViewPtAngle1, $CellContext`gcViewPtAngle2, \ $CellContext`gcViewPtAngleDelta}], Control[{$CellContext`cvViewPtMult$$, \ $CellContext`gcViewPtMultValues, ControlType -> VerticalSlider, ImageSize -> Tiny}]}, { Button[ Tooltip[ "reset", "Reset perspective values to defaults."], \ $CellContext`cvViewPtAngle$$ = $CellContext`gcViewPtAngleInit; \ $CellContext`cvViewPtMult$$ = $CellContext`gcViewPtMultInit], SpanFromLeft}}]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ Framed[ Column[{ Tooltip[ Style["basic moves", 16, Bold, GrayLevel[0]], "Choose a face and layer(s).\nThen press an action button."], Framed[ Row[{ Tooltip[ Style["face: ", 14, Bold, GrayLevel[0]], "Choose a Face:\n Front, Right, Up,\n Back, Left, \ Down."], Control[{$CellContext`cvSelectedFace$$, { 4 -> Style[" F ", 12], 5 -> Style[" R ", 12], 6 -> Style[" U ", 12], 7 -> Style[" B ", 12], 8 -> Style[" L", 12], 9 -> Style[" D ", 12]}, ControlType -> SetterBar}]}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> {{9.5, 9.5}, {5, 5}}], Grid[{{ Framed[ Grid[{{ Tooltip[ Style["layers", 14, Bold, GrayLevel[0]], "Choose one or more Layers to be rotated."], SpanFromLeft}, { Control[{$CellContext`cvSelectedLayersFRU$$, Range[$CellContext`cvNx$$], ControlType -> ListPicker, Alignment -> Top}], Control[{$CellContext`cvSelectedLayersFRU$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar, Appearance -> "Vertical"}]}, { Button[ Tooltip[ "clear", "Unselect all layers."], \ $CellContext`cvSelectedLayersFRU$$ = {}], SpanFromLeft}, { Column[{ Tooltip[ Grid[{{"show"}, {"rings"}}, Spacings -> {1, 0.1}], "Show \"Rings\" indicating selected layer(s)."], Control[{$CellContext`cvShowRings$$, {True, False}}]}, Center], SpanFromLeft}}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> 5], Column[{ Framed[ Grid[{{ Tooltip[ Style["action", 14, Bold, GrayLevel[0]], "Perform the rotation for the selected Face and \ Layer(s)."], SpanFromLeft}, { Style["cw", Bold, 12], Style["ccw", Bold, 12]}, { Button["quarter", $CellContext`doFS1[$CellContext`gcCW], Enabled -> $CellContext`cvReady$$], Button["quarter", $CellContext`doFS1[$CellContext`gcCCW], Enabled -> $CellContext`cvReady$$]}, { Button["half", $CellContext`doFS1[$CellContext`gcCW2], Enabled -> $CellContext`cvReady$$], Button["half", $CellContext`doFS1[$CellContext`gcCCW2], Enabled -> $CellContext`cvReady$$]}}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> 5], Framed[ Grid[{{ Tooltip[ Style["whole-cube", 14, Bold, GrayLevel[0]], "Rotate the whole cube one quarter\nturn about the \ indicated face."], SpanFromLeft}, { Button["F", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 4, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["F'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 4, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}, { Button["R", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 5, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["R'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 5, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}, { Button["U", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 6, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["U'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 6, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}}, Spacings -> {1., 0.3}], Background -> RGBColor[0.8799999999999999, 0.8200000000000001, 0.76], FrameMargins -> {{10.5, 10.5}, {5, 5}}]}, Center, 0.6]}}, Alignment -> Top]}, Center, 0.6], Background -> RGBColor[0.823529411764706, 0.9129411764705883, 1.], FrameMargins -> 8]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ OpenerView[{ Tooltip[ Style["deep view controls", 14, Bold, RGBColor[0, 0, 1]], "Render selected subcube groups invisible."], Framed[ Column[{ Grid[{{"F", Control[{$CellContext`cvXInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "B"}, {"R", Control[{$CellContext`cvYInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "L"}, {"U", Control[{$CellContext`cvZInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "D"}}, Spacings -> {0.7, 0.1}], Row[{ Grid[{{"wire"}, {"frames"}}, Spacings -> {1, 0.2}], " ", Control[{$CellContext`cvWireFrame$$, {True, False}}], " ", Button[ "clear all", $CellContext`cvXInvis$$ = \ ($CellContext`cvYInvis$$ = ($CellContext`cvZInvis$$ = {})), ImageSize -> 60]}], "____________________", Tooltip[ "show selected ", "Display all subcubes or only aligned or misaligned."], Control[{$CellContext`cvShowMisAl3$$, { 1 -> "all", 2 -> "aligned", 3 -> "misaligned"}, ControlType -> RadioButtonBar, Appearance -> "Vertical"}]}, Center], Background -> RGBColor[1., 0.95, 1.]]}, Background -> RGBColor[0.9, 0.9, 1.]]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ OpenerView[{ Tooltip[ Style["user-defined sequences", 14, Bold, RGBColor[0, 0, 1]], "Manage your own move sequences."], Framed[ Column[{ Row[{ Control[{$CellContext`cvRecOn$$, {True -> Tooltip[ Style["on", 12, Bold, Darker[Green, 0.4]], "Start recording moves."], False -> Tooltip[ Style["off", 12, Bold, Red], "Stop recording moves."]}, ControlType -> SetterBar, Enabled -> True}], Button[ Tooltip[ "clear", "Delete all recorded moves and turn off recording."], \ $CellContext`cvRecOn$$ = False; $CellContext`recClear[], Enabled -> True], Button[ Tooltip["bkspc", "Delete the last recorded move (if any)."], $CellContext`recBackspace[]]}, Spacer[10]], Grid[{{ Button[ Tooltip[ "save", "Save the contents of the recording buffer as a UDS."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Save"], Enabled -> $CellContext`cvUdsSaveOK$$], Button[ Tooltip[ "ov'write", "Replace the selected UDS with the contents of the \ recording buffer."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Overwrite"], Enabled -> $CellContext`cvUdsOverwriteOK$$], Button[ Tooltip[ "append", "Append the contents of the recording buffer to the \ selected UDS."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Append"], Enabled -> $CellContext`cvUdsOverwriteOK$$]}, { Tooltip[ Control[{$CellContext`cvIxUds$$, Table[$CellContext`i -> Style[ StringJoin[ ToString[$CellContext`i], Part[$CellContext`gsUserSeqName, $CellContext`i]], 12, FontFamily -> "Courier"], {$CellContext`i, $CellContext`gcNumUserSeqs}], ControlType -> PopupMenu, FrameMargins -> 0, ImageMargins -> {{4, 4}, {2, 2}}, ImageSize -> 170}], "Menu of user-defined sequences.\n(Select one on which to \ apply an action button.)"], SpanFromLeft, SpanFromLeft}, { Button[ Tooltip[ Style["delete", GrayLevel[1], Bold, 12], "Delete the selected UDS."], $CellContext`recUdsDelete[$CellContext`cvIxUds$$], Background -> RGBColor[1, 0.25, 0], Enabled -> $CellContext`cvUdsDeleteOK$$], Button[ Tooltip[ Style["undel", GrayLevel[1], Bold, 12], "Restore the last-deleted UDS."], $CellContext`recUdsRestore[$CellContext`cvIxUds$$], Background -> RGBColor[0.4, 0.4, 1.], Enabled -> True], Null}, { Style["execute:", Bold, 12], Button[ Tooltip["fwd", "Execute the selected UDS."], $CellContext`doSeqUser[$CellContext`cvIxUds$$, \ $CellContext`cvNx$$, False], Enabled -> $CellContext`cvUdsExecuteOK$$], Button[ Tooltip["rev", "Execute the selected UDS in reverse."], $CellContext`doSeqUser[$CellContext`cvIxUds$$, \ $CellContext`cvNx$$, True], Enabled -> $CellContext`cvUdsExecuteOK$$]}}, ItemSize -> 5.5, Spacings -> {0.2, 0.4}], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]]}, Left], Background -> RGBColor[1., 0.85, 1.], FrameMargins -> 4]}, Background -> RGBColor[0.9, 0.9, 1.]]]], Manipulate`Dump`ThisIsNotAControl}, { Hold[ Item[ Row[{ Column[{ Style["DeepCube", 18, Bold, RGBColor[0.11764705882352941`, 0.5647058823529412, 1.]], Style[ "\[Copyright] 2015, Louis J. Palumbo ", 12, Italic, FontFamily -> "Times New Roman", RGBColor[0.11764705882352941`, 0.5647058823529412, 1.]], Null}, Left], Framed[ Row[{ Tooltip[ Style["history controls:", 14, Bold, GrayLevel[0]], "Execute moves in the saved history."], Spacer[8], ButtonBar[{Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Rectangle[{0, 0}, {2, 8}], Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], "Go back to the beginning of saved history."] :> \ $CellContext`histMovePtr[-Infinity], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], "Go back N moves."] :> \ $CellContext`histMovePtr[-$CellContext`cvNumHist$$], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{0, 4}, {7, 0}, {7, 8}}], Rectangle[{8, 0}, {10, 8}]}}, {ImageSize -> {24, 16}}], "Go back one move."] :> $CellContext`histMovePtr[-1], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Rectangle[{0, 0}, {2, 8}], Polygon[{{3, 0}, {3, 8}, {10, 4}}]}}, { ImageSize -> {24, 16}}], "Go forward one move."] :> $CellContext`histMovePtr[1], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}]}}, {ImageSize -> {24, 16}}], "Go forward N moves."] :> \ $CellContext`histMovePtr[$CellContext`cvNumHist$$], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}], Rectangle[{10, 0}, {12, 8}]}}, {ImageSize -> {24, 16}}], "Go forward to the end of saved history."] :> \ $CellContext`histMovePtr[Infinity]}, ImageMargins -> 1.5, Enabled -> $CellContext`cvReady$$], Spacer[8], Style["N = ", 14], Tooltip[ Control[{$CellContext`cvNumHist$$, {2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 70, 100, 200}, ControlType -> PopupMenu, ImageMargins -> 0, Enabled -> $CellContext`cvReady$$}], Row[{"Choose the number of moves executed by the ", Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], " and ", Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}]}}, {ImageSize -> {24, 16}}], " buttons."}]], Spacer[20], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]], Spacer[16], Button[ Tooltip[ Style["clear history", GrayLevel[1], Bold, 14], "Erase all moves in the history buffer."], If[$CellContext`gsHistBufferLength > 0, $CellContext`cvClearHist$$ = True], ImageSize -> Automatic, Background -> RGBColor[1, 0.25, 0], Enabled -> $CellContext`cvReady$$]}], Background -> RGBColor[0.8, 0.8, 1.], FrameMargins -> {{10, 10}, {4, 4}}]}]]], Manipulate`Dump`ThisIsNotAControl}}, Typeset`size$$ = { 690., {285., 292.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False}, DynamicBox[Manipulate`ManipulateBoxes[ 2, StandardForm, "Variables" :> {$CellContext`cvAbortFlag$$ = False, $CellContext`cvAngleix$$ = 1, $CellContext`cvAnimOpt$$ = 1, $CellContext`cvBkgdColor$$ = GrayLevel[0.85], $CellContext`cvClearHist$$ = False, $CellContext`cvCubeState$$ = {{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}}, $CellContext`cvCurrAxisXYZ$$ = 1, $CellContext`cvCurrLayerListXYZ$$ = {}, $CellContext`cvCurrMove$$ = \ {}, $CellContext`cvDbgPause$$ = False, $CellContext`cvEdgeColor$$ = GrayLevel[0], $CellContext`cvEdgeTh$$ = 4, $CellContext`cvFaceC1$$ = RGBColor[1, 1, 0], $CellContext`cvFaceC2$$ = RGBColor[1, 0, 0], $CellContext`cvFaceC3$$ = RGBColor[0, 0, 1], $CellContext`cvFaceC4$$ = RGBColor[0.29, 0.47, 0.48], $CellContext`cvFaceC5$$ = RGBColor[0.8, 0.6, 0], $CellContext`cvFaceC6$$ = RGBColor[1, 1, 1], $CellContext`cvForceRings$$ = False, $CellContext`cvFreeze$$ = False, $CellContext`cvIxUds$$ = 1, $CellContext`cvMoveIsNormal$$ = True, $CellContext`cvMoves$$ = {}, $CellContext`cvMovesIx$$ = 1, $CellContext`cvNumHist$$ = 5, $CellContext`cvNumMoves$$ = 0, $CellContext`cvNumSteps$$ = 3, $CellContext`cvNumStepsNext$$ = 3, $CellContext`cvNx$$ = 5, $CellContext`cvOldNx$$ = -1, $CellContext`cvReady$$ = True, $CellContext`cvRecOn$$ = False, $CellContext`cvRevSeqs$$ = False, $CellContext`cvRingColor$$ = RGBColor[0.94, 0.88, 0.94], $CellContext`cvRingTh$$ = 3, $CellContext`cvRotAngle$$ = 0., $CellContext`cvRotating$$ = False, $CellContext`cvSelectedFace$$ = 4, $CellContext`cvSelectedLayersFRU$$ = {}, \ $CellContext`cvSeqAnimOn$$ = True, $CellContext`cvSeqDesc$$ = "None", $CellContext`cvShowCores$$ = False, $CellContext`cvShowFrames$$ = False, $CellContext`cvShowMisAl3$$ = 1, $CellContext`cvShowRings$$ = True, $CellContext`cvShowRingsTemp$$ = True, $CellContext`cvSolvedOri$$ = 1, $CellContext`cvSubcubeSize$$ = 75, $CellContext`cvTurnix$$ = 0, $CellContext`cvUdsDeleteOK$$ = False, $CellContext`cvUdsExecuteOK$$ = False, $CellContext`cvUdsOverwriteOK$$ = False, $CellContext`cvUdsSaveOK$$ = False, $CellContext`cvViewOpt$$ = 1, $CellContext`cvViewPtAngle$$ = {0.7853981633974483, 0.9553166181245093}, $CellContext`cvViewPtMult$$ = 3., $CellContext`cvWindowWidth$$ = 320, $CellContext`cvWireFrame$$ = False, $CellContext`cvXInvis$$ = {}, $CellContext`cvYInvis$$ = {}, \ $CellContext`cvZInvis$$ = {}}, "ControllerVariables" :> {}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ( If[$CellContext`cvNx$$ != $CellContext`cvOldNx$$, \ {$CellContext`cvTurnix$$, $CellContext`cvSelectedFace$$, \ $CellContext`cvSelectedLayersFRU$$} = { 0, 4, {}}; {$CellContext`cvCurrAxisXYZ$$, \ $CellContext`cvCurrLayerListXYZ$$, $CellContext`cvRotAngle$$, \ $CellContext`cvShowRingsTemp$$, $CellContext`cvForceRings$$, \ $CellContext`cvReady$$} = $CellContext`finishSequence[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; $CellContext`cvXInvis$$ = ($CellContext`cvYInvis$$ = \ ($CellContext`cvZInvis$$ = {})); $CellContext`cvCubeState$$ = \ $CellContext`solvedCube[$CellContext`cvNx$$, $CellContext`cvSolvedOri$$]; \ $CellContext`histInit[]; $CellContext`cvRecOn$$ = False; $CellContext`recClear[]; $CellContext`udsClearAll[]; \ $CellContext`cvIxUds$$ = 1; $CellContext`cvOldNx$$ = $CellContext`cvNx$$; \ $CellContext`cvRotating$$ = False; Null]; While[ And[$CellContext`cvFreeze$$, Not[$CellContext`cvAbortFlag$$]], Pause[0.25]]; If[$CellContext`cvRotating$$, $CellContext`cvAnimOpt$$ = 3, $CellContext`cvNumSteps$$ = $CellContext`cvNumStepsNext$$; \ $CellContext`cvAnimOpt$$ = Which[ Or[ Not[$CellContext`cvSeqAnimOn$$], $CellContext`cvNumSteps$$ < 1], 1, $CellContext`cvNumSteps$$ == 1, 2, $CellContext`cvNumSteps$$ >= 2, 3]; $CellContext`cvTurnix$$ = 2 $CellContext`cvNumSteps$$ - 1; Null]; {$CellContext`cvUdsDeleteOK$$, $CellContext`cvUdsExecuteOK$$, \ $CellContext`cvUdsOverwriteOK$$, $CellContext`cvUdsSaveOK$$} = \ $CellContext`updateUdsOK[ Part[$CellContext`gsUserSeq, $CellContext`cvIxUds$$], \ $CellContext`gsRecBuffLen, $CellContext`cvReady$$]; \ {$CellContext`cvCurrAxisXYZ$$, $CellContext`cvCurrLayerListXYZ$$} = \ $CellContext`getAxisLayersXYZ[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; \ $CellContext`cvMoveIsNormal$$ = True; Which[$CellContext`cvAnimOpt$$ == 1, If[$CellContext`cvMovesIx$$ <= $CellContext`cvNumMoves$$, \ $CellContext`cvReady$$ = False; $CellContext`logMoveList[$CellContext`cvNx$$, Part[$CellContext`cvMoves$$, Span[$CellContext`cvMovesIx$$, All]]]; $CellContext`cvCubeState$$ = \ $CellContext`rotateLayersSeq[$CellContext`cvNx$$, Part[$CellContext`cvMoves$$, Span[$CellContext`cvMovesIx$$, All]], $CellContext`cvCubeState$$]; Null]; $CellContext`cvAbortFlag$$ = False; {$CellContext`cvCurrAxisXYZ$$, \ $CellContext`cvCurrLayerListXYZ$$, $CellContext`cvRotAngle$$, \ $CellContext`cvShowRingsTemp$$, $CellContext`cvForceRings$$, \ $CellContext`cvReady$$} = $CellContext`finishSequence[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Null, $CellContext`cvAnimOpt$$ == 2, If[$CellContext`cvAbortFlag$$, {$CellContext`cvMoves$$, \ $CellContext`cvNumMoves$$, $CellContext`cvAbortFlag$$, \ $CellContext`cvFreeze$$, $CellContext`cvReady$$, $CellContext`cvForceRings$$} = \ $CellContext`handleAbort[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$]; Null]; If[$CellContext`cvMovesIx$$ <= $CellContext`cvNumMoves$$, \ $CellContext`cvReady$$ = False; $CellContext`cvCurrMove$$ = Part[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$]; If[ $CellContext`normalMoveQ[$CellContext`cvCurrMove$$], \ $CellContext`logOneMove[$CellContext`cvNx$$, $CellContext`cvCurrMove$$]; \ $CellContext`cvCubeState$$ = $CellContext`rotateLayers[$CellContext`cvNx$$, \ $CellContext`cvCurrMove$$, $CellContext`cvCubeState$$]; Null, $CellContext`specialAction[$CellContext`cvNx$$, \ $CellContext`cvCurrMove$$]; Null]; Increment[$CellContext`cvMovesIx$$]; Null]; If[$CellContext`cvMovesIx$$ > $CellContext`cvNumMoves$$, \ {$CellContext`cvCurrAxisXYZ$$, $CellContext`cvCurrLayerListXYZ$$, \ $CellContext`cvRotAngle$$, $CellContext`cvShowRingsTemp$$, \ $CellContext`cvForceRings$$, $CellContext`cvReady$$} = \ $CellContext`finishSequence[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Null]; {$CellContext`cvCurrAxisXYZ$$, \ $CellContext`cvCurrLayerListXYZ$$, $CellContext`cvRotAngle$$} = \ $CellContext`finishMove[$CellContext`cvNx$$, $CellContext`cvSelectedFace$$, \ $CellContext`cvSelectedLayersFRU$$]; Null, $CellContext`cvAnimOpt$$ == 3, If[$CellContext`cvTurnix$$ == 2 $CellContext`cvNumSteps$$ - 1, If[$CellContext`cvAbortFlag$$, {$CellContext`cvMoves$$, \ $CellContext`cvNumMoves$$, $CellContext`cvAbortFlag$$, \ $CellContext`cvFreeze$$, $CellContext`cvReady$$, $CellContext`cvForceRings$$} = \ $CellContext`handleAbort[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$]; Null]; $CellContext`cvMoveIsNormal$$ = True; If[$CellContext`cvMovesIx$$ <= $CellContext`cvNumMoves$$, \ $CellContext`cvCurrMove$$ = Part[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$]; \ $CellContext`cvMoveIsNormal$$ = \ $CellContext`normalMoveQ[$CellContext`cvCurrMove$$]; If[ Not[$CellContext`cvMoveIsNormal$$], \ $CellContext`specialAction[$CellContext`cvNx$$, $CellContext`cvCurrMove$$]; Increment[$CellContext`cvMovesIx$$]; Null, $CellContext`cvReady$$ = False; $CellContext`cvRotating$$ = True; $CellContext`logOneMove[$CellContext`cvNx$$, \ $CellContext`cvCurrMove$$]; Null]; Null]; If[$CellContext`cvMovesIx$$ > $CellContext`cvNumMoves$$, \ {$CellContext`cvCurrAxisXYZ$$, $CellContext`cvCurrLayerListXYZ$$, \ $CellContext`cvRotAngle$$, $CellContext`cvShowRingsTemp$$, \ $CellContext`cvForceRings$$, $CellContext`cvReady$$} = \ $CellContext`finishSequence[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Null]; Null]; If[ And[$CellContext`cvMoveIsNormal$$, $CellContext`cvMovesIx$$ <= \ $CellContext`cvNumMoves$$], {$CellContext`cvCurrAxisXYZ$$, \ $CellContext`cvCurrLayerListXYZ$$, $CellContext`cvAngleix$$} = \ $CellContext`mfGetXYZParts[$CellContext`cvNx$$, Part[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$]]; If[$CellContext`cvTurnix$$ > Part[{0, 1, 0, 1, 0}, $CellContext`cvAngleix$$], $CellContext`cvRotAngle$$ = \ $CellContext`calcRotAngle[$CellContext`cvAngleix$$, \ $CellContext`cvNumSteps$$, $CellContext`cvTurnix$$]; $CellContext`cvTurnix$$ = \ $CellContext`cvTurnix$$ - Part[{0, 2, 1, 2, 1}, $CellContext`cvAngleix$$]; Null, $CellContext`cvCubeState$$ = \ $CellContext`rotateLayers[$CellContext`cvNx$$, Part[$CellContext`cvMoves$$, $CellContext`cvMovesIx$$], \ $CellContext`cvCubeState$$]; $CellContext`cvRotating$$ = False; Increment[$CellContext`cvMovesIx$$]; \ {$CellContext`cvCurrAxisXYZ$$, $CellContext`cvCurrLayerListXYZ$$, \ $CellContext`cvRotAngle$$} = $CellContext`finishMove[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$]; Null]]; Null]; If[$CellContext`cvDbgPause$$, Pause[1/2]]; If[$CellContext`cvClearHist$$, $CellContext`histInit[]; \ $CellContext`cvClearHist$$ = False]; $CellContext`displayGraphics[$CellContext`cvNx$$, \ $CellContext`cvOldNx$$, $CellContext`cvCubeState$$, \ $CellContext`cvSolvedOri$$, $CellContext`cvNumSteps$$, \ $CellContext`cvNumStepsNext$$, $CellContext`cvSeqAnimOn$$, \ $CellContext`cvRotAngle$$, $CellContext`cvRevSeqs$$, \ $CellContext`cvAbortFlag$$, $CellContext`cvFreeze$$, \ $CellContext`cvViewOpt$$, $CellContext`cvShowCores$$, \ $CellContext`cvWindowWidth$$, $CellContext`cvSubcubeSize$$, \ $CellContext`cvCurrAxisXYZ$$, $CellContext`cvCurrLayerListXYZ$$, \ $CellContext`cvShowRings$$, $CellContext`cvShowRingsTemp$$, \ $CellContext`cvForceRings$$, $CellContext`cvXInvis$$, \ $CellContext`cvYInvis$$, $CellContext`cvZInvis$$, $CellContext`cvWireFrame$$, \ $CellContext`cvShowMisAl3$$, $CellContext`cvRecOn$$, $CellContext`cvIxUds$$, \ $CellContext`cvUdsDeleteOK$$, $CellContext`cvUdsExecuteOK$$, \ $CellContext`cvUdsOverwriteOK$$, $CellContext`cvUdsSaveOK$$, \ $CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$, \ $CellContext`cvEdgeTh$$, $CellContext`cvRingTh$$, $CellContext`cvEdgeColor$$, \ $CellContext`cvRingColor$$, $CellContext`cvBkgdColor$$, \ $CellContext`cvViewPtAngle$$, $CellContext`cvViewPtMult$$, \ $CellContext`cvNumHist$$, $CellContext`cvClearHist$$, \ $CellContext`cvShowFrames$$]), "Specifications" :> {{{$CellContext`cvAngleix$$, 1, ""}, ControlType -> None}, {{$CellContext`cvAnimOpt$$, 1, ""}, ControlType -> None}, {{$CellContext`cvAbortFlag$$, False, ""}, ControlType -> None}, {{$CellContext`cvBkgdColor$$, GrayLevel[0.85], ""}, ControlType -> None}, {{$CellContext`cvClearHist$$, False, ""}, ControlType -> None}, {{$CellContext`cvCubeState$$, {{{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}, {{1, 1, 1, 1, 1}, { 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}, {1, 1, 1, 1, 1}}}, ""}, ControlType -> None}, {{$CellContext`cvCurrAxisXYZ$$, 1, ""}, ControlType -> None}, {{$CellContext`cvCurrLayerListXYZ$$, {}, ""}, ControlType -> None}, {{$CellContext`cvCurrMove$$, {}, ""}, ControlType -> None}, {{$CellContext`cvDbgPause$$, False, ""}, ControlType -> None}, {{$CellContext`cvEdgeColor$$, GrayLevel[0], ""}, ControlType -> None}, {{$CellContext`cvEdgeTh$$, 4, ""}, ControlType -> None}, {{$CellContext`cvFaceC1$$, RGBColor[1, 1, 0], ""}, ControlType -> None}, {{$CellContext`cvFaceC2$$, RGBColor[1, 0, 0], ""}, ControlType -> None}, {{$CellContext`cvFaceC3$$, RGBColor[0, 0, 1], ""}, ControlType -> None}, {{$CellContext`cvFaceC4$$, RGBColor[0.29, 0.47, 0.48], ""}, ControlType -> None}, {{$CellContext`cvFaceC5$$, RGBColor[0.8, 0.6, 0], ""}, ControlType -> None}, {{$CellContext`cvFaceC6$$, RGBColor[1, 1, 1], ""}, ControlType -> None}, {{$CellContext`cvFreeze$$, False, ""}, ControlType -> None}, {{$CellContext`cvForceRings$$, False, ""}, ControlType -> None}, {{$CellContext`cvIxUds$$, 1, ""}, ControlType -> None}, {{$CellContext`cvMoveIsNormal$$, True, ""}, ControlType -> None}, {{$CellContext`cvMoves$$, {}, ""}, ControlType -> None}, {{$CellContext`cvMovesIx$$, 1, ""}, ControlType -> None}, {{$CellContext`cvNumHist$$, 5, ""}, ControlType -> None}, {{$CellContext`cvNumMoves$$, 0, ""}, ControlType -> None}, {{$CellContext`cvNumSteps$$, 3, ""}, ControlType -> None}, {{$CellContext`cvNumStepsNext$$, 3, ""}, ControlType -> None}, {{$CellContext`cvNx$$, 5, ""}, ControlType -> None}, {{$CellContext`cvOldNx$$, -1, ""}, ControlType -> None}, {{$CellContext`cvReady$$, True, ""}, ControlType -> None}, {{$CellContext`cvRecOn$$, False, ""}, ControlType -> None}, {{$CellContext`cvRevSeqs$$, False, ""}, ControlType -> None}, {{$CellContext`cvRingColor$$, RGBColor[0.94, 0.88, 0.94], ""}, ControlType -> None}, {{$CellContext`cvRingTh$$, 3, ""}, ControlType -> None}, {{$CellContext`cvRotAngle$$, 0., ""}, ControlType -> None}, {{$CellContext`cvRotating$$, False, ""}, ControlType -> None}, {{$CellContext`cvSelectedFace$$, 4, ""}, ControlType -> None}, {{$CellContext`cvSelectedLayersFRU$$, {}, ""}, ControlType -> None}, {{$CellContext`cvSeqAnimOn$$, True, ""}, ControlType -> None}, {{$CellContext`cvSeqDesc$$, "None", ""}, ControlType -> None}, {{$CellContext`cvShowCores$$, False, ""}, ControlType -> None}, {{$CellContext`cvShowFrames$$, False, ""}, ControlType -> None}, {{$CellContext`cvShowMisAl3$$, 1, ""}, ControlType -> None}, {{$CellContext`cvShowRings$$, True, ""}, ControlType -> None}, {{$CellContext`cvShowRingsTemp$$, True, ""}, ControlType -> None}, {{$CellContext`cvSolvedOri$$, 1, ""}, ControlType -> None}, {{$CellContext`cvSubcubeSize$$, 75, ""}, ControlType -> None}, {{$CellContext`cvTurnix$$, 0, ""}, ControlType -> None}, {{$CellContext`cvUdsDeleteOK$$, False, ""}, ControlType -> None}, {{$CellContext`cvUdsExecuteOK$$, False, ""}, ControlType -> None}, {{$CellContext`cvUdsOverwriteOK$$, False, ""}, ControlType -> None}, {{$CellContext`cvUdsSaveOK$$, False, ""}, ControlType -> None}, {{$CellContext`cvViewPtAngle$$, {0.7853981633974483, 0.9553166181245093}, ""}, ControlType -> None}, {{$CellContext`cvViewOpt$$, 1, ""}, ControlType -> None}, {{$CellContext`cvViewPtMult$$, 3., ""}, ControlType -> None}, {{$CellContext`cvWindowWidth$$, 320, ""}, ControlType -> None}, {{$CellContext`cvWireFrame$$, False, ""}, ControlType -> None}, {{$CellContext`cvXInvis$$, {}, ""}, ControlType -> None}, {{$CellContext`cvYInvis$$, {}, ""}, ControlType -> None}, {{$CellContext`cvZInvis$$, {}, ""}, ControlType -> None}, Item[ Row[{ Framed[ Grid[{{ Button[ Tooltip[ " solved cube ", "Reset the cube to a pristine state.\n(Does not erase move \ history.)"], $CellContext`cvCubeState$$ = \ $CellContext`solvedCube[$CellContext`cvNx$$, $CellContext`cvSolvedOri$$]; \ $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Null, Enabled -> $CellContext`cvReady$$, ImageSize -> Automatic], SpanFromLeft}, { Tooltip[ Style["cube length:", 14, Bold, GrayLevel[0]], "Number of subcubes per side"], Tooltip[ Control[{$CellContext`cvNx$$, 1, $CellContext`gcMaxCubeLength, 1, ControlType -> PopupMenu, Enabled -> $CellContext`cvReady$$}], " **** WARNING ****\n Changing the cube length \ resets the cube to \n a solved state, erases your move history and \n \ deletes all your user-defined sequences."]}}], Background -> RGBColor[0.92, 0.88, 0.8400000000000001], FrameMargins -> {{10, 10}, {6, 6}}], Framed[ Column[{ Tooltip[ Style["animation", 14, Bold, GrayLevel[0]], "Configure animation of rotating layers."], Row[{Column[{ Tooltip[ Style["steps", 12, Bold, GrayLevel[0]], "Choose the number of animation steps per quarter turn."], Control[{$CellContext`cvNumStepsNext$$, Range[8], ControlType -> PopupMenu, ImageMargins -> {{4, 6}, {0, 0}}}]}, Center] Spacer[3], Column[{ Tooltip[ Style["seq anim", 12, Bold, GrayLevel[0]], "Enable/disable sequence animation."], Control[{$CellContext`cvSeqAnimOn$$, {True -> Tooltip[ Style["on", 14], "Turn sequence animation ON."], False -> Tooltip[ Style["off", 14], "Turn sequence animation OFF."]}, ControlType -> SetterBar}]}, Center] Spacer[3]}]}, Center], Background -> RGBColor[1, 0.9, 0.8], FrameMargins -> {{5, 5}, {5, 5}}], Framed[ Column[{ Row[{ Tooltip[ Style["sequences & patterns", 14, Bold, GrayLevel[0]], "Useful and interesting move sequences. The resulting\n\ patterns of most of these may be affected by choices of\nFace and Layers in \ the Basic Moves panel."], Control[{$CellContext`cvRevSeqs$$, {False -> Tooltip[ Style["forward", 12], "Execute sequences forward."], True -> Tooltip[ Style["reverse", 12], "Execute sequences in reverse."]}, ControlType -> SetterBar, Enabled -> $CellContext`cvReady$$}], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]]}, Spacer[10]], Row[{ ActionMenu[ Tooltip[ "corners", "Sequences affecting only corner subcubes."], { "Flip2AdjacentCorners" :> $CellContext`doSeqNamed[ "Flip2AdjacentCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2FaceDiagCorners" :> $CellContext`doSeqNamed[ "Flip2FaceDiagCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2CubeDiagCorners" :> $CellContext`doSeqNamed[ "Flip2CubeDiagCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Swap3Corners" :> $CellContext`doSeqNamed[ "Swap3Corners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip[ "edges", "Sequences affecting only edge subcubes."], { "Swap3Edges8Moves" :> $CellContext`doSeqNamed[ "Swap3Edges8Moves", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameFaceNoFlip" :> $CellContext`doSeqNamed[ "Swap3EdgesSameFaceNoFlip", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameFaceFlip2" :> $CellContext`doSeqNamed[ "Swap3EdgesSameFaceFlip2", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameCorner" :> $CellContext`doSeqNamed[ "Swap3EdgesSameCorner", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap3EdgesSameCornerAlt" :> $CellContext`doSeqNamed[ "Swap3EdgesSameCornerAlt", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Flip2EdgesInPlace" :> $CellContext`doSeqNamed[ "Flip2EdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip4EdgesInPlace" :> $CellContext`doSeqNamed[ "Flip4EdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "FlipAllEdgesInPlace" :> $CellContext`doSeqNamed[ "FlipAllEdgesInPlace", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Swap2Edges" :> $CellContext`doSeqNamed[ "Swap2Edges", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Swap4Edges" :> $CellContext`doSeqNamed[ "Swap4Edges", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip["patterns", "Interesting patterns."], { "Dots" :> $CellContext`doSeqNamed[ "Dots", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Checkers" :> $CellContext`doSeqNamed[ "Checkers", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Ripple" :> $CellContext`doSeqNamed[ "Ripple", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "MultiRipple" :> $CellContext`doSeqNamed[ "MultiRipple", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "RotateMidFaces180Deg" :> $CellContext`doSeqNamed[ "RotateMidFaces180Deg", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "RotateCore180Deg" :> $CellContext`doSeqNamed[ "RotateCore180Deg", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Flip2BigCorners" :> $CellContext`doSeqNamed[ "Flip2BigCorners", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip[ "random", "Random sequences for scrambling the cube."], { "Scramble 10" :> $CellContext`doSeqNamed[ "Scramble 10", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble 20" :> $CellContext`doSeqNamed[ "Scramble 20", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble 100" :> $CellContext`doSeqNamed[ "Scramble 100", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], Delimiter, "Scramble/Solve 10" :> $CellContext`doSeqNamed[ "Scramble/Solve 10", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble/Solve 20" :> $CellContext`doSeqNamed[ "Scramble/Solve 20", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$], "Scramble/Solve 100" :> $CellContext`doSeqNamed[ "Scramble/Solve 100", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]}, Enabled -> $CellContext`cvReady$$], ActionMenu[ Tooltip[ "demos", " Demos illustrating some DeepCube features. \n (Best \ results with cube length = 4, 5, or 6.) "], { "View Options" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "View Options", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Subcube Sizes" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Subcube Sizes", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "Face Colors" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Face Colors", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Edges Colors/Styles" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Edges Colors/Styles", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Rings Colors/Styles" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Rings Colors/Styles", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Background Colors" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Background Colors", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "Invisible Layers" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Invisible Layers", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Show Misaligned" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Show Misaligned", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Perspective" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Perspective", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), "Animation Steps" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "Animation Steps", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$]), Delimiter, "All Demos" :> ($CellContext`cvSeqAnimOn$$ = True; $CellContext`doSeqNamed[ "All Demos", $CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`cvRevSeqs$$])}, Enabled -> $CellContext`cvReady$$]}, Spacer[5]]}, Center], Background -> RGBColor[1, 1, 0.95], FrameMargins -> {{10, 10}, {6, 6}}], Framed[ Column[{ Tooltip[ Style["view options", 14, GrayLevel[0], Bold], "Choose front/back views and visibility of inner cores."], Row[{ Control[{$CellContext`cvViewOpt$$, { 1 -> "front view", 2 -> "back view", 3 -> "both"}, ControlType -> RadioButtonBar, Appearance -> "Vertical"}], Column[{ Style["show\ncores", LineSpacing -> {0.8, 0}], Control[{$CellContext`cvShowCores$$, {True, False}}]}, Center]}, Spacer[20]]}, Center], Background -> RGBColor[1., 0.925, 0.85], FrameMargins -> {{10, 10}, {6, 6}}]}, Spacer[8], Alignment -> {Center, Center}], ControlPlacement -> Top], Item[ Row[{ Row[{ Tooltip[ " display width ", "Adjust the width of the cube display window."], Control[{$CellContext`cvWindowWidth$$, 200, 500, 10, ControlType -> Slider, Appearance -> "Labeled", ImageSize -> 150}], Tooltip[ " subcube size ", "Adjust the subecube size.\n(Smaller sizes let you see past the \ exterior subcubes into the interior.)"], Control[{$CellContext`cvSubcubeSize$$, \ $CellContext`gcMinSubcubeSize, $CellContext`gcMaxSubcubeSize, 1, ControlType -> Slider, Appearance -> "Labeled", ImageMargins -> {{0, 0}, {0, 0}}, ImageSize -> 150}]}]}], ControlPlacement -> Top], Item[ OpenerView[{ Tooltip[ Style["subcube colors ", 14, Bold, RGBColor[0, 0, 1]], "Modify subcube face colors."], Column[{ Framed[ Grid[{{ Tooltip[ Style["color schemes", 14, Bold, GrayLevel[0]], "Choose random or specific color schemes."], SpanFromLeft, SpanFromLeft}, { Button[ Tooltip[ "def", "Reset to default colors."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-1], ImageMargins -> 1], Button[ Tooltip[ "rnd", "Color subcube faces randomly."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-2], ImageMargins -> 1], ActionMenu[ Tooltip["alt", "Choose a color scheme from a list."], {Row[{ RGBColor[0., 1., 1.], RGBColor[1., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[0., 0.8, 0.5], RGBColor[0.7000000000000001, 0.8, 0.], RGBColor[ 0.5, 0.5, 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[61]), Row[{ RGBColor[0., 0., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[1., 1., 1.], RGBColor[0., 1., 1.], RGBColor[0., 1., 0.], RGBColor[ 0., 0., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[62]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 0., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0., 1.], RGBColor[ 1., 1., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[63]), Row[{ RGBColor[0.2, 1., 1.], RGBColor[0.2, 0.8, 1.], RGBColor[0.2, 0.6000000000000001, 0.2], RGBColor[0.2, 0.30000000000000004`, 0.6000000000000001], RGBColor[0.2, 1., 0.2], RGBColor[ 0.2, 0., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[64]), Row[{ RGBColor[0.5, 0., 0.], RGBColor[0.5, 0.5, 1.], RGBColor[0.5, 0., 1.], RGBColor[0.5, 0.5, 0.], RGBColor[0.5, 1., 1.], RGBColor[ 0.5, 1., 0.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[65]), Row[{ RGBColor[1., 0., 0.], RGBColor[1., 0., 0.8], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[1., 1., 1.], RGBColor[ 0.2, 0.4, 0.6000000000000001]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[66]), Row[{ RGBColor[0., 0.8, 0.], RGBColor[1., 1., 0.], RGBColor[1., 0., 0.], RGBColor[0., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[ 0., 0., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[67]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[ 1., 1., 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[68]), Row[{ RGBColor[1., 0.2, 0.2], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[0.6000000000000001, 0.9, 0.6000000000000001], RGBColor[0.7000000000000001, 0.7000000000000001, 1.], RGBColor[ 0.8, 0., 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[69]), Row[{ RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[1., 0.8, 0.8], RGBColor[0.8, 1., 0.8], RGBColor[ 0.8, 0.8, 1.]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[70]), Row[{ RGBColor[0., 0.9, 0.9], RGBColor[1., 0., 1.], RGBColor[1., 1., 0.], RGBColor[0.9, 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[ 1., 1., 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[71]), Row[{ RGBColor[0.8, 0., 0.], RGBColor[0., 0.8, 0.], RGBColor[0., 0., 0.8], RGBColor[0.7000000000000001, 0.5, 0.2], RGBColor[0.7000000000000001, 1., 0.7000000000000001], RGBColor[ 0.6000000000000001, 0.6000000000000001, 0.8]}] :> ({$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[72])}, ImageMargins -> 1]}}, Spacings -> {0, 0.2}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> 4], Framed[ Grid[{{ Tooltip[ Style["face colors", 14, Bold, GrayLevel[0]], "Choose colors for subcube faces.\n(Click on a color to \ change it.)\nNote: F, R,U, etc. refer to faces\nin the \"solved cube\" \ orientation."], SpanFromLeft, SpanFromLeft}, {"F", "R", "U"}, { Framed[ Control[{$CellContext`cvFaceC1$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC2$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC3$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0]}, { Framed[ Control[{$CellContext`cvFaceC4$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC5$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvFaceC6$$, Red, ControlType -> ColorSetter, ImageSize -> {28, 28}}], FrameMargins -> 0]}, {"B", "L", "D"}}, Alignment -> {Center, Center}, Background -> GrayLevel[0.9], Spacings -> {1., 0.3}], Background -> GrayLevel[0.9], FrameMargins -> {{5, 5}, {4, 4}}], Framed[ Grid[{{ Tooltip[ Style["permute colors", 14, Bold, GrayLevel[0]], "Rearrange current colors."], SpanFromLeft}, { Button[ Tooltip[ "rnd", "Randomly permute current colors."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-5, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "cw", "Cycle clockwise."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-6, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "ccw", "Cycle counterclockwise."], \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-7, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "\[UpDownArrow]", "Swap top & bottom rows."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-8, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1], Button[ Tooltip[ "\[RightArrow]", "Swap columns cyclically."], {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-9, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], ImageMargins -> 1]}}, Alignment -> {Center, Center}, Spacings -> {0., 0.3}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> {{2, 2}, {2, 2}}]}, Center]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0], ControlPlacement -> Left], Item[ OpenerView[{ Tooltip[ Style["other colors", 14, Bold, RGBColor[0, 0, 1]], "Modify colors/styles for rings, background, etc."], Column[{ Framed[ Grid[{{ Tooltip[ Style["edges", 11], "Choose a color for the subcube edges."], Tooltip[ Style["rings", 11], "Choose a color for the layer-indicator rings."], Tooltip[ Style["bkgd", 11], "Choose a background color for the cube display."]}, { Framed[ Control[{$CellContext`cvEdgeColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvRingColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0], Framed[ Control[{$CellContext`cvBkgdColor$$, Red, ControlType -> ColorSetter, ImageSize -> {25, 25}}], FrameMargins -> 0]}}, Alignment -> {Center, Center}, Background -> GrayLevel[0.9], Spacings -> {0.6, 0.4}], Background -> GrayLevel[0.9], FrameMargins -> {{10, 10}, {4, 4}}], Framed[ Grid[{{"thicknesses", SpanFromLeft, Null}, { Control[{$CellContext`cvEdgeTh$$, 0, 10, 1, ControlType -> PopupMenu}], Control[{$CellContext`cvRingTh$$, 0, 7, 1, ControlType -> PopupMenu}]}, { Tooltip[ Style["edges", 11], "Choose a thickness for subcube edges."], Tooltip[ Style["rings", 11], "Choose a thickness for layer-indicator rings"], Null}}, Alignment -> {Center, Center}, Spacings -> {0.5, 0.3}], Background -> RGBColor[0.85, 0.85, 1.], FrameMargins -> {{10, 0}, {4, 4}}], Button[ Tooltip[ "defaults", "Reset thicknesses & colors to default values."], \ {$CellContext`cvEdgeTh$$, $CellContext`cvRingTh$$, \ $CellContext`cvEdgeColor$$, $CellContext`cvRingColor$$, \ $CellContext`cvBkgdColor$$} = {$CellContext`gcDfltEdgeTh, \ $CellContext`gcDfltRingTh, $CellContext`gcDfltEdgeColor, \ $CellContext`gcDfltRingColor, $CellContext`gcDfltBkgdColor}; Null, ImageSize -> {80, Automatic}]}, Center]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0], ControlPlacement -> Left], Item[ OpenerView[{ Tooltip[ Style["perspective", 14, Bold, RGBColor[0, 0, 1]], "Adjust viewpoint angles and perspective."], Grid[{{ Tooltip["view angle", "Change viewing angle."], Tooltip["dist", "Change viewing distance."]}, { Control[{$CellContext`cvViewPtAngle$$, \ $CellContext`gcViewPtAngle1, $CellContext`gcViewPtAngle2, \ $CellContext`gcViewPtAngleDelta}], Control[{$CellContext`cvViewPtMult$$, \ $CellContext`gcViewPtMultValues, ControlType -> VerticalSlider, ImageSize -> Tiny}]}, { Button[ Tooltip[ "reset", "Reset perspective values to defaults."], \ $CellContext`cvViewPtAngle$$ = $CellContext`gcViewPtAngleInit; \ $CellContext`cvViewPtMult$$ = $CellContext`gcViewPtMultInit], SpanFromLeft}}]}, Background -> RGBColor[0.9, 0.9, 1.], ImageMargins -> 0], ControlPlacement -> Left], Item[ Framed[ Column[{ Tooltip[ Style["basic moves", 16, Bold, GrayLevel[0]], "Choose a face and layer(s).\nThen press an action button."], Framed[ Row[{ Tooltip[ Style["face: ", 14, Bold, GrayLevel[0]], "Choose a Face:\n Front, Right, Up,\n Back, Left, \ Down."], Control[{$CellContext`cvSelectedFace$$, { 4 -> Style[" F ", 12], 5 -> Style[" R ", 12], 6 -> Style[" U ", 12], 7 -> Style[" B ", 12], 8 -> Style[" L", 12], 9 -> Style[" D ", 12]}, ControlType -> SetterBar}]}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> {{9.5, 9.5}, {5, 5}}], Grid[{{ Framed[ Grid[{{ Tooltip[ Style["layers", 14, Bold, GrayLevel[0]], "Choose one or more Layers to be rotated."], SpanFromLeft}, { Control[{$CellContext`cvSelectedLayersFRU$$, Range[$CellContext`cvNx$$], ControlType -> ListPicker, Alignment -> Top}], Control[{$CellContext`cvSelectedLayersFRU$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar, Appearance -> "Vertical"}]}, { Button[ Tooltip[ "clear", "Unselect all layers."], \ $CellContext`cvSelectedLayersFRU$$ = {}], SpanFromLeft}, { Column[{ Tooltip[ Grid[{{"show"}, {"rings"}}, Spacings -> {1, 0.1}], "Show \"Rings\" indicating selected layer(s)."], Control[{$CellContext`cvShowRings$$, {True, False}}]}, Center], SpanFromLeft}}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> 5], Column[{ Framed[ Grid[{{ Tooltip[ Style["action", 14, Bold, GrayLevel[0]], "Perform the rotation for the selected Face and \ Layer(s)."], SpanFromLeft}, { Style["cw", Bold, 12], Style["ccw", Bold, 12]}, { Button["quarter", $CellContext`doFS1[$CellContext`gcCW], Enabled -> $CellContext`cvReady$$], Button["quarter", $CellContext`doFS1[$CellContext`gcCCW], Enabled -> $CellContext`cvReady$$]}, { Button["half", $CellContext`doFS1[$CellContext`gcCW2], Enabled -> $CellContext`cvReady$$], Button["half", $CellContext`doFS1[$CellContext`gcCCW2], Enabled -> $CellContext`cvReady$$]}}], Background -> RGBColor[0.6470588235294118, 0.8258823529411765, 1.], FrameMargins -> 5], Framed[ Grid[{{ Tooltip[ Style["whole-cube", 14, Bold, GrayLevel[0]], "Rotate the whole cube one quarter\nturn about the \ indicated face."], SpanFromLeft}, { Button["F", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 4, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["F'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 4, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}, { Button["R", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 5, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["R'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 5, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}, { Button["U", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 6, $CellContext`gcCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35], Button["U'", $CellContext`doSeqWholeCube[$CellContext`cvNx$$, 6, $CellContext`gcCCW], Enabled -> $CellContext`cvReady$$, ImageSize -> 35]}}, Spacings -> {1., 0.3}], Background -> RGBColor[0.8799999999999999, 0.8200000000000001, 0.76], FrameMargins -> {{10.5, 10.5}, {5, 5}}]}, Center, 0.6]}}, Alignment -> Top]}, Center, 0.6], Background -> RGBColor[0.823529411764706, 0.9129411764705883, 1.], FrameMargins -> 8], ControlPlacement -> Right], Item[ OpenerView[{ Tooltip[ Style["deep view controls", 14, Bold, RGBColor[0, 0, 1]], "Render selected subcube groups invisible."], Framed[ Column[{ Grid[{{"F", Control[{$CellContext`cvXInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "B"}, {"R", Control[{$CellContext`cvYInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "L"}, {"U", Control[{$CellContext`cvZInvis$$, Range[$CellContext`cvNx$$], ControlType -> TogglerBar}], "D"}}, Spacings -> {0.7, 0.1}], Row[{ Grid[{{"wire"}, {"frames"}}, Spacings -> {1, 0.2}], " ", Control[{$CellContext`cvWireFrame$$, {True, False}}], " ", Button[ "clear all", $CellContext`cvXInvis$$ = \ ($CellContext`cvYInvis$$ = ($CellContext`cvZInvis$$ = {})), ImageSize -> 60]}], "____________________", Tooltip[ "show selected ", "Display all subcubes or only aligned or misaligned."], Control[{$CellContext`cvShowMisAl3$$, { 1 -> "all", 2 -> "aligned", 3 -> "misaligned"}, ControlType -> RadioButtonBar, Appearance -> "Vertical"}]}, Center], Background -> RGBColor[1., 0.95, 1.]]}, Background -> RGBColor[0.9, 0.9, 1.]], ControlPlacement -> Right], Item[ OpenerView[{ Tooltip[ Style["user-defined sequences", 14, Bold, RGBColor[0, 0, 1]], "Manage your own move sequences."], Framed[ Column[{ Row[{ Control[{$CellContext`cvRecOn$$, {True -> Tooltip[ Style["on", 12, Bold, Darker[Green, 0.4]], "Start recording moves."], False -> Tooltip[ Style["off", 12, Bold, Red], "Stop recording moves."]}, ControlType -> SetterBar, Enabled -> True}], Button[ Tooltip[ "clear", "Delete all recorded moves and turn off recording."], \ $CellContext`cvRecOn$$ = False; $CellContext`recClear[], Enabled -> True], Button[ Tooltip["bkspc", "Delete the last recorded move (if any)."], $CellContext`recBackspace[]]}, Spacer[10]], Grid[{{ Button[ Tooltip[ "save", "Save the contents of the recording buffer as a UDS."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Save"], Enabled -> $CellContext`cvUdsSaveOK$$], Button[ Tooltip[ "ov'write", "Replace the selected UDS with the contents of the \ recording buffer."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Overwrite"], Enabled -> $CellContext`cvUdsOverwriteOK$$], Button[ Tooltip[ "append", "Append the contents of the recording buffer to the \ selected UDS."], $CellContext`recUdsSave[$CellContext`cvNx$$, \ $CellContext`cvIxUds$$, $CellContext`gcMoveTextFormat, "Append"], Enabled -> $CellContext`cvUdsOverwriteOK$$]}, { Tooltip[ Control[{$CellContext`cvIxUds$$, Table[$CellContext`i -> Style[ StringJoin[ ToString[$CellContext`i], Part[$CellContext`gsUserSeqName, $CellContext`i]], 12, FontFamily -> "Courier"], {$CellContext`i, $CellContext`gcNumUserSeqs}], ControlType -> PopupMenu, FrameMargins -> 0, ImageMargins -> {{4, 4}, {2, 2}}, ImageSize -> 170}], "Menu of user-defined sequences.\n(Select one on which to \ apply an action button.)"], SpanFromLeft, SpanFromLeft}, { Button[ Tooltip[ Style["delete", GrayLevel[1], Bold, 12], "Delete the selected UDS."], $CellContext`recUdsDelete[$CellContext`cvIxUds$$], Background -> RGBColor[1, 0.25, 0], Enabled -> $CellContext`cvUdsDeleteOK$$], Button[ Tooltip[ Style["undel", GrayLevel[1], Bold, 12], "Restore the last-deleted UDS."], $CellContext`recUdsRestore[$CellContext`cvIxUds$$], Background -> RGBColor[0.4, 0.4, 1.], Enabled -> True], Null}, { Style["execute:", Bold, 12], Button[ Tooltip["fwd", "Execute the selected UDS."], $CellContext`doSeqUser[$CellContext`cvIxUds$$, \ $CellContext`cvNx$$, False], Enabled -> $CellContext`cvUdsExecuteOK$$], Button[ Tooltip["rev", "Execute the selected UDS in reverse."], $CellContext`doSeqUser[$CellContext`cvIxUds$$, \ $CellContext`cvNx$$, True], Enabled -> $CellContext`cvUdsExecuteOK$$]}}, ItemSize -> 5.5, Spacings -> {0.2, 0.4}], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]]}, Left], Background -> RGBColor[1., 0.85, 1.], FrameMargins -> 4]}, Background -> RGBColor[0.9, 0.9, 1.]], ControlPlacement -> Right], Item[ Row[{ Column[{ Style["DeepCube", 18, Bold, RGBColor[0.11764705882352941`, 0.5647058823529412, 1.]], Style[ "\[Copyright] 2015, Louis J. Palumbo ", 12, Italic, FontFamily -> "Times New Roman", RGBColor[0.11764705882352941`, 0.5647058823529412, 1.]], Null}, Left], Framed[ Row[{ Tooltip[ Style["history controls:", 14, Bold, GrayLevel[0]], "Execute moves in the saved history."], Spacer[8], ButtonBar[{Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Rectangle[{0, 0}, {2, 8}], Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], "Go back to the beginning of saved history."] :> \ $CellContext`histMovePtr[-Infinity], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], "Go back N moves."] :> \ $CellContext`histMovePtr[-$CellContext`cvNumHist$$], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{0, 4}, {7, 0}, {7, 8}}], Rectangle[{8, 0}, {10, 8}]}}, {ImageSize -> {24, 16}}], "Go back one move."] :> $CellContext`histMovePtr[-1], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Rectangle[{0, 0}, {2, 8}], Polygon[{{3, 0}, {3, 8}, {10, 4}}]}}, { ImageSize -> {24, 16}}], "Go forward one move."] :> $CellContext`histMovePtr[1], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}]}}, {ImageSize -> {24, 16}}], "Go forward N moves."] :> \ $CellContext`histMovePtr[$CellContext`cvNumHist$$], Tooltip[ Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}], Rectangle[{10, 0}, {12, 8}]}}, {ImageSize -> {24, 16}}], "Go forward to the end of saved history."] :> \ $CellContext`histMovePtr[Infinity]}, ImageMargins -> 1.5, Enabled -> $CellContext`cvReady$$], Spacer[8], Style["N = ", 14], Tooltip[ Control[{$CellContext`cvNumHist$$, {2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 70, 100, 200}, ControlType -> PopupMenu, ImageMargins -> 0, Enabled -> $CellContext`cvReady$$}], Row[{"Choose the number of moves executed by the ", Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 4}, {7, 0}, {7, 8}}, {{5, 4}, {12, 0}, {12, 8}}}]}}, {ImageSize -> {24, 16}}], " and ", Graphics[{ RGBColor[0.2, 0.2, 1.], { Polygon[{{{0, 0}, {0, 8}, {7, 4}}, {{5, 0}, {5, 8}, {12, 4}}}]}}, {ImageSize -> {24, 16}}], " buttons."}]], Spacer[20], Row[{ Button[ Tooltip[ Graphics[{ RGBColor[1, 0, 0], Rectangle[{0, 0}]}, ImageSize -> 14], "Abort the currently executing sequence."], \ $CellContext`cvAbortFlag$$ = True, FrameMargins -> 2, Enabled -> True], Button[ Tooltip[ Graphics[{ RGBColor[0., 0.5, 0.], Rectangle[{0, 0}, {2, 8}], Rectangle[{3, 0}, {5, 8}], Polygon[{{8, 0}, {8, 8}, {15, 4}}]}, ImageSize -> {25, 14}], "Pause/resume the currently executing sequence."], \ $CellContext`cvFreeze$$ = Not[$CellContext`cvFreeze$$], FrameMargins -> 2, Enabled -> True]}, Spacer[1]], Spacer[16], Button[ Tooltip[ Style["clear history", GrayLevel[1], Bold, 14], "Erase all moves in the history buffer."], If[$CellContext`gsHistBufferLength > 0, $CellContext`cvClearHist$$ = True], ImageSize -> Automatic, Background -> RGBColor[1, 0.25, 0], Enabled -> $CellContext`cvReady$$]}], Background -> RGBColor[0.8, 0.8, 1.], FrameMargins -> {{10, 10}, {4, 4}}]}], ControlPlacement -> Bottom]}, "Options" :> { TrackedSymbols :> Full, PreserveImageOptions -> False, BaseStyle -> { GrayLevel[0], Background -> RGBColor[0.9, 0.9, 1.], Framed -> True}, Paneled -> False, ImageMargins -> 0, FrameMargins -> 0, Frame -> True}, "DefaultOptions" :> {}], ImageSizeCache->{1097., {409., 416.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>({{$CellContext`finishSequence[ Pattern[$CellContext`maNx, Blank[]], Pattern[$CellContext`maSelectedFace, Blank[]], Pattern[$CellContext`maSelectedLayersFRU, Blank[]]] := Module[{$CellContext`mlCurrAxisXYZ, $CellContext`mlCurrLayerListXYZ, \ $CellContext`mlRotAngle, $CellContext`mlShowRingsTemp, \ $CellContext`mlForceRings, $CellContext`mlReady}, \ {$CellContext`mlCurrAxisXYZ, $CellContext`mlCurrLayerListXYZ} = \ $CellContext`getAxisLayersXYZ[$CellContext`maNx, $CellContext`maSelectedFace, \ $CellContext`maSelectedLayersFRU]; $CellContext`mlRotAngle = 0.; $CellContext`mlShowRingsTemp = True; $CellContext`mlForceRings = False; $CellContext`mlReady = True; {$CellContext`mlCurrAxisXYZ, \ $CellContext`mlCurrLayerListXYZ, $CellContext`mlRotAngle, \ $CellContext`mlShowRingsTemp, $CellContext`mlForceRings, \ $CellContext`mlReady}], $CellContext`getAxisLayersXYZ[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layersfru, Blank[]], Optional[ Pattern[$CellContext`debug, Blank[]], False]] := Module[{$CellContext`axis, $CellContext`layersxyz}, Assert[ 1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in getAxisLayersXYZ"]; Assert[4 <= $CellContext`face <= $CellContext`gcMaxFaceIx, "face in getAxisLayersXYZ"]; $CellContext`axis = Mod[$CellContext`face, 3, 1]; $CellContext`layersxyz = Which[4 <= $CellContext`face <= 6, Map[$CellContext`nx + 1 - #& , $CellContext`layersfru], 7 <= $CellContext`face <= $CellContext`gcMaxFaceIx, \ $CellContext`layersfru, True, {}]; $CellContext`layersxyz = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layersxyz]; If[$CellContext`debug, Print[ "getAxisLayersXYZ: nx = ", $CellContext`nx, ", face = ", $CellContext`face, ", \n\t\t\tlayersfru = ", $CellContext`layersfru, ", axis = ", $CellContext`axis, ", layersxyz =", $CellContext`layersxyz]]; {$CellContext`axis, \ $CellContext`layersxyz}], Attributes[Assert] = {HoldAllComplete}, TagSet[Assert, MessageName[Assert, "asrtf"], "Assertion `1` failed."], TagSet[Assert, MessageName[Assert, "asrtfe"], "Assertion `1` in `2` failed."], TagSet[Assert, MessageName[Assert, "asrttf"], "Assertion test `1` evaluated to `2` that is neither True nor \ False."], $CellContext`gcMaxCubeLength = 9, $CellContext`gcMaxFaceIx = 9, $CellContext`mfCleanLayers[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layerlist, Blank[]]] := Select[ Union[ Flatten[{$CellContext`layerlist}]], 1 <= # <= $CellContext`nx& ], $CellContext`solvedCube[ Pattern[$CellContext`nx, Blank[Integer]], Optional[ Pattern[$CellContext`ori, Blank[Integer]], 1]] := ConstantArray[$CellContext`ori, {$CellContext`nx, $CellContext`nx, \ $CellContext`nx}], $CellContext`histInit[] := \ ($CellContext`gsHistBufferLength = 0; $CellContext`gsHistPtr = 0; $CellContext`gbHistIntBuffer = ConstantArray[ 0, $CellContext`gcHistMaxLen]; $CellContext`gsHistIntBuffer = {}; \ $CellContext`gbHistTextBufferFRU = ConstantArray[ "", $CellContext`gcHistMaxLen]; $CellContext`gbHistTextBufferRCN = ConstantArray[ "", $CellContext`gcHistMaxLen]; $CellContext`gsHistStixLen = 1; $CellContext`gbHistStixBuffer = ConstantArray[ 0, $CellContext`gcHistStixMaxLen]; $CellContext`gsHistStixBuffer = \ {1}; Part[$CellContext`gbHistStixBuffer, 1] = 1; $CellContext`gsHistTraversing = 0; $CellContext`gsHistTotalMoves = 0; Null), $CellContext`gsHistBufferLength = 0, $CellContext`gsHistPtr = 0, $CellContext`gbHistIntBuffer = CompressedData[" 1:eJztwTEBACAMA7Digncu0IGEGcD/xzcVSarf7ZXk7AAAAAAAAIwPw+4B+A== "], $CellContext`gcHistMaxLen = 6200, $CellContext`gsHistIntBuffer = {}, \ $CellContext`gbHistTextBufferFRU = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}, $CellContext`gbHistTextBufferRCN = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}, $CellContext`gsHistStixLen = 1, $CellContext`gbHistStixBuffer = CompressedData[" 1:eJxTTMoPSmJkYGDgY2NgANGjYBSMglEwCkY6AACY+wG9 "], $CellContext`gcHistStixMaxLen = 1550, $CellContext`gsHistStixBuffer = { 1}, $CellContext`gsHistTraversing = 0, $CellContext`gsHistTotalMoves = 0, $CellContext`recClear[] := ($CellContext`gbRecIntBuffer = ConstantArray[ 0, $CellContext`gcRecMaxLen]; $CellContext`gsRecIntBuffer = {}; \ $CellContext`gsRecBuffLen = 0; Null), $CellContext`gbRecIntBuffer = CompressedData[" 1:eJztwTEBACAMA7Digncu0IGEGcD/xzcVSarf7ZXk7AAAAAAAAIwPw+4B+A== "], $CellContext`gcRecMaxLen = 6200, $CellContext`gsRecIntBuffer = {}, $CellContext`gsRecBuffLen = 0, $CellContext`udsClearAll[] := ($CellContext`gsUserSeq = ConstantArray[{}, $CellContext`gcNumUserSeqs]; \ $CellContext`gsUserSeqName = ConstantArray[ "", $CellContext`gcNumUserSeqs]; $CellContext`gsLastDeletedUds = \ {}; $CellContext`gsLastDeletedUdsName = ""; Null), $CellContext`gsUserSeq = {{}, {}, {}, {}, {}, {}, {}, {}, \ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, \ {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, \ {}, {}, {}, {}}, $CellContext`gcNumUserSeqs = 50, $CellContext`gsUserSeqName = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}, $CellContext`gsLastDeletedUds = {}, \ $CellContext`gsLastDeletedUdsName = "", $CellContext`updateUdsOK[ Pattern[$CellContext`useq, Blank[]], Pattern[$CellContext`recbufflen, Blank[]], Pattern[$CellContext`rdy, Blank[]]] := Module[{$CellContext`udslen, $CellContext`del, $CellContext`exec, \ $CellContext`over, $CellContext`save}, $CellContext`udslen = Length[$CellContext`useq]; $CellContext`del = $CellContext`udslen > 0; $CellContext`exec = And[$CellContext`rdy, $CellContext`udslen > 0]; $CellContext`over = $CellContext`recbufflen > 0; $CellContext`save = And[$CellContext`recbufflen > 0, $CellContext`udslen <= 0]; {$CellContext`del, $CellContext`exec, $CellContext`over, \ $CellContext`save}], $CellContext`logMoveList[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`movelist$, Blank[]]] := (If[$CellContext`gsHistTraversing == 0, Map[$CellContext`histAddOneMove[$CellContext`nx$, #]& , \ $CellContext`movelist$], AddTo[$CellContext`gsHistPtr, $CellContext`gsHistTraversing Length[$CellContext`movelist$]]]; If[$CellContext`cvRecOn$$, Map[$CellContext`recAddOneMove[#]& , $CellContext`movelist$]]; Null), $CellContext`histAddOneMove[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`move, Blank[]]] := Module[{$CellContext`ix1, $CellContext`textline}, If[ Not[1 <= Part[$CellContext`move, 1] <= $CellContext`gcMaxFaceIx], Return[]]; $CellContext`gsHistPtr = $CellContext`gsHistPtr + 1; $CellContext`gsHistTotalMoves = $CellContext`gsHistTotalMoves + 1; If[$CellContext`gsHistPtr < $CellContext`gsHistBufferLength + 1, $CellContext`histTrunc[]]; If[$CellContext`gsHistPtr > $CellContext`gcHistMaxLen, \ $CellContext`histDropEarlyMoves[]; Null]; Part[$CellContext`gbHistIntBuffer, $CellContext`gsHistPtr] = \ $CellContext`mfMove2Int[$CellContext`move]; Part[$CellContext`gbHistTextBufferFRU, $CellContext`gsHistPtr] = \ $CellContext`mfMove2Text[$CellContext`nx, $CellContext`move, False]; Part[$CellContext`gbHistTextBufferRCN, $CellContext`gsHistPtr] = \ $CellContext`mfMove2Text[$CellContext`nx, $CellContext`move, True]; $CellContext`gsHistBufferLength = $CellContext`gsHistPtr; \ $CellContext`ix1 = Part[$CellContext`gbHistStixBuffer, $CellContext`gsHistStixLen]; \ $CellContext`textline = Switch[$CellContext`gcMoveTextFormat, "FRU", $CellContext`histTextLine[ Part[$CellContext`gbHistTextBufferFRU, Span[$CellContext`ix1, $CellContext`gsHistPtr]]], "RCN", $CellContext`histTextLine[ Part[$CellContext`gbHistTextBufferRCN, Span[$CellContext`ix1, $CellContext`gsHistPtr]]]]; If[StringLength[$CellContext`textline] > \ $CellContext`gcHistMaxDisplayWidth, $CellContext`gsHistStixLen = \ $CellContext`gsHistStixLen + 1; Part[$CellContext`gbHistStixBuffer, $CellContext`gsHistStixLen] = \ $CellContext`gsHistPtr; Null]; Null], $CellContext`histTrunc[] := Module[{}, $CellContext`gsHistBufferLength = $CellContext`gsHistPtr; If[$CellContext`gsHistBufferLength <= 0, Part[$CellContext`gbHistStixBuffer, 1] = 1; $CellContext`gsHistStixLen = 1, While[ Part[$CellContext`gbHistStixBuffer, $CellContext`gsHistStixLen] > \ $CellContext`gsHistBufferLength, Part[$CellContext`gbHistStixBuffer, $CellContext`gsHistStixLen] = 0; Decrement[$CellContext`gsHistStixLen]]]; Null], $CellContext`histDropEarlyMoves[] := Module[{$CellContext`hs, $CellContext`movesgoal, \ $CellContext`ixstix, $CellContext`linestodrop, $CellContext`movestodrop}, \ $CellContext`hs = Part[$CellContext`gbHistStixBuffer, Span[1, $CellContext`gsHistStixLen]]; $CellContext`movesgoal = Round[0.15 $CellContext`gcHistMaxLen]; $CellContext`ixstix = Part[ Position[$CellContext`hs, First[ Select[$CellContext`hs, # >= $CellContext`movesgoal& , 1]]], 1, 1]; $CellContext`linestodrop = $CellContext`ixstix - 1; $CellContext`movestodrop = Part[$CellContext`hs, $CellContext`ixstix] - 1; $CellContext`gbHistStixBuffer = PadRight[ Drop[$CellContext`gbHistStixBuffer, $CellContext`linestodrop], \ $CellContext`gcHistStixMaxLen]; SubtractFrom[$CellContext`gsHistStixLen, $CellContext`linestodrop]; SubtractFrom[ Part[$CellContext`gbHistStixBuffer, Span[ 1, $CellContext`gsHistStixLen]], $CellContext`movestodrop]; \ $CellContext`gbHistIntBuffer = PadRight[ Drop[$CellContext`gbHistIntBuffer, $CellContext`movestodrop], \ $CellContext`gcHistMaxLen]; $CellContext`gbHistTextBufferFRU = PadRight[ Drop[$CellContext`gbHistTextBufferFRU, \ $CellContext`movestodrop], $CellContext`gcHistMaxLen, ""]; $CellContext`gbHistTextBufferRCN = PadRight[ Drop[$CellContext`gbHistTextBufferRCN, \ $CellContext`movestodrop], $CellContext`gcHistMaxLen, ""]; SubtractFrom[$CellContext`gsHistPtr, $CellContext`movestodrop]; SubtractFrom[$CellContext`gsHistBufferLength, \ $CellContext`movestodrop]; Null], $CellContext`mfMove2Int[ Pattern[$CellContext`move, Blank[]]] := Module[{$CellContext`face, $CellContext`layerlist, $CellContext`dir, \ $CellContext`layerint}, {$CellContext`face, $CellContext`layerlist, \ $CellContext`dir} = $CellContext`move; $CellContext`layerint = Total[2^Union[Flatten[{$CellContext`layerlist}] - 1]]; 100 $CellContext`layerint + 10 $CellContext`face + $CellContext`dir], $CellContext`mfMove2Text[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`move, Blank[]], Optional[ Pattern[$CellContext`optRCN, Blank[]], True]] := Module[{$CellContext`face, $CellContext`layerlist, $CellContext`dir, \ $CellContext`mv, $CellContext`laylist, $CellContext`mvtxt, \ $CellContext`facein = Part[$CellContext`move, 1]}, $CellContext`mv = If[4 <= $CellContext`facein <= $CellContext`gcMaxFaceIx, \ $CellContext`move, $CellContext`mfMoveXYZ2FRU[$CellContext`nx, $CellContext`move]]; \ {$CellContext`face, $CellContext`layerlist, $CellContext`dir} = \ $CellContext`mv; $CellContext`laylist = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layerlist]; \ $CellContext`mvtxt = If[$CellContext`optRCN, If[ And[$CellContext`nx > 1, Length[$CellContext`laylist] == $CellContext`nx], If[$CellContext`face >= 7, $CellContext`dir = \ $CellContext`mfOppositeDir[$CellContext`dir]]; Part[$CellContext`gcRCNTextWholeCube, Mod[$CellContext`face, 3, 1], $CellContext`dir], StringJoin[ $CellContext`mfLayers2TextRCN[$CellContext`nx, \ $CellContext`layerlist], Part[$CellContext`gcRCNTextFaceDir, $CellContext`face, \ $CellContext`dir]]], If[Length[$CellContext`laylist] == $CellContext`nx, Part[$CellContext`gcFRUTextWholeCube, $CellContext`face, \ $CellContext`dir], StringJoin[ Part[$CellContext`gcFRUTextFace, $CellContext`face], $CellContext`mfLayers2TextFRU[$CellContext`nx, \ $CellContext`layerlist], Part[$CellContext`gcFRUTextDir, $CellContext`dir]]]]; \ $CellContext`mvtxt], $CellContext`mfMoveXYZ2FRU[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveXYZ, Blank[]]] := Module[{$CellContext`axis = Part[$CellContext`moveXYZ, 1], $CellContext`layersXYZ = Part[$CellContext`moveXYZ, 2], $CellContext`dirXYZ = Part[$CellContext`moveXYZ, 3], $CellContext`laylist, $CellContext`laylistc}, \ {$CellContext`laylist, $CellContext`laylistc} = \ $CellContext`mfLayersAndCompl[$CellContext`nx, $CellContext`layersXYZ]; If[Total[$CellContext`laylist] < Total[$CellContext`laylistc], {$CellContext`axis + 6, $CellContext`laylist, $CellContext`mfOppositeDir[$CellContext`dirXYZ]}, \ {$CellContext`axis + 3, $CellContext`laylistc, $CellContext`dirXYZ}]], \ $CellContext`mfLayersAndCompl[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layerlist, Blank[]]] := Module[{$CellContext`laylist, $CellContext`laylistc}, \ $CellContext`laylist = $CellContext`mfCleanLayers[$CellContext`nx, \ $CellContext`layerlist]; $CellContext`laylistc = Union[ Flatten[ Map[$CellContext`nx + 1 - #& , $CellContext`laylist]]]; {$CellContext`laylist, \ $CellContext`laylistc}], $CellContext`mfOppositeDir[ Condition[ Pattern[$CellContext`d, Blank[Integer]], 1 <= $CellContext`d <= 5]] := ($CellContext`mfOppositeDir[$CellContext`d] = Part[{1, 4, 5, 2, 3}, $CellContext`d]), $CellContext`gcRCNTextWholeCube = {{ "N", "wcF'", "wcF2'", "wcF", "wcF2"}, { "N", "wcR'", "wcR2'", "wcR", "wcR2"}, { "N", "wcU'", "wcU2'", "wcU", "wcU2"}}, $CellContext`mfLayers2TextRCN[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layerlist, Blank[]]] := Module[{$CellContext`laylist}, $CellContext`laylist = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layerlist]; Which[$CellContext`laylist === {1}, "", Length[$CellContext`laylist] == $CellContext`nx, "wc", True, StringJoin[ Map[ ToString, $CellContext`laylist]]]], \ $CellContext`gcRCNTextFaceDir = {{"N", "NN", "NNN", "N", "NN"}, { "N", "NN", "NNN", "N", "NN"}, {"N", "NN", "NNN", "N", "NN"}, { "N", "F'", "F2'", "F", "F2"}, {"N", "R'", "R2'", "R", "R2"}, { "N", "U'", "U2'", "U", "U2"}, {"N", "B'", "B2'", "B", "B2"}, { "N", "L'", "L2'", "L", "L2"}, { "N", "D'", "D2'", "D", "D2"}}, $CellContext`gcFRUTextWholeCube = {{ "N", "XW-", "XW--", "XW+", "XW++"}, { "N", "YW-", "YW--", "YW+", "YW++"}, { "N", "ZW-", "ZW--", "ZW+", "ZW++"}, { "N", "FW-", "FW--", "FW+", "FW++"}, { "N", "RW-", "RW--", "RW+", "RW++"}, { "N", "UW-", "UW--", "UW+", "UW++"}, { "N", "BW-", "BW--", "BW+", "BW++"}, { "N", "LW-", "LW--", "LW+", "LW++"}, { "N", "DW-", "DW--", "DW+", "DW++"}}, $CellContext`gcFRUTextFace = { "X", "Y", "Z", "F", "R", "U", "B", "L", "D"}, $CellContext`mfLayers2TextFRU[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layerlist, Blank[]]] := Module[{$CellContext`laylist}, $CellContext`laylist = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layerlist]; Which[Length[$CellContext`laylist] == $CellContext`nx, "W", True, StringJoin[ Map[ ToString, $CellContext`laylist]]]], $CellContext`gcFRUTextDir = \ {"N", "-", "--", "+", "++"}, $CellContext`gcMoveTextFormat = "RCN", $CellContext`histTextLine[ Pattern[$CellContext`textmoveList, Blank[]]] := Module[{$CellContext`ix, $CellContext`txtline}, $CellContext`txtline = ""; For[$CellContext`ix = 1, $CellContext`ix <= Length[$CellContext`textmoveList], Increment[$CellContext`ix], $CellContext`txtline = StringJoin[$CellContext`txtline, Part[$CellContext`textmoveList, $CellContext`ix], " "]]; $CellContext`txtline], \ $CellContext`gcHistMaxDisplayWidth = 80, $CellContext`recAddOneMove[ Pattern[$CellContext`move, Blank[]]] := (If[ Not[1 <= Part[$CellContext`move, 1] <= $CellContext`gcMaxFaceIx], Return[]]; Increment[$CellContext`gsRecBuffLen]; If[$CellContext`gsRecBuffLen > $CellContext`gcRecMaxLen, $CellContext`recDropEarlyMoves[]]; Part[$CellContext`gbRecIntBuffer, $CellContext`gsRecBuffLen] = \ $CellContext`mfMove2Int[$CellContext`move]; Null), $CellContext`recDropEarlyMoves[] := Module[{$CellContext`movestodrop}, $CellContext`movestodrop = Round[0.15 $CellContext`gcRecMaxLen]; $CellContext`gbRecIntBuffer = PadRight[ Drop[$CellContext`gbRecIntBuffer, $CellContext`movestodrop], \ $CellContext`gcRecMaxLen]; SubtractFrom[$CellContext`gsRecBuffLen, $CellContext`movestodrop]; Null], $CellContext`rotateLayersSeq[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveSeq, Blank[]], Pattern[$CellContext`oldCubeState, Blank[]]] := Module[{$CellContext`newCubeState, $CellContext`ix}, \ $CellContext`newCubeState = $CellContext`oldCubeState; For[$CellContext`ix = 1, $CellContext`ix <= Length[$CellContext`moveSeq], Increment[$CellContext`ix], $CellContext`newCubeState = \ $CellContext`rotateLayers[$CellContext`nx, Part[$CellContext`moveSeq, $CellContext`ix], \ $CellContext`newCubeState]]; $CellContext`newCubeState], \ $CellContext`rotateLayers[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`move, Blank[]], Pattern[$CellContext`oldCubeState, Blank[]]] := Module[{$CellContext`facein = Part[$CellContext`move, 1], $CellContext`layersin = Part[$CellContext`move, 2], $CellContext`moveXYZ, $CellContext`axis, \ $CellContext`layers, $CellContext`laylist, $CellContext`dir, \ $CellContext`newCubeState, $CellContext`ix}, If[ Not[1 <= $CellContext`facein <= $CellContext`gcMaxFaceIx], Return[$CellContext`oldCubeState]]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layersin], "layersin in rotateLayers"]; $CellContext`newCubeState = \ $CellContext`oldCubeState; $CellContext`moveXYZ = If[4 <= $CellContext`facein <= $CellContext`gcMaxFaceIx, $CellContext`mfMoveFRU2XYZ[$CellContext`nx, $CellContext`move], \ $CellContext`move]; {$CellContext`axis, $CellContext`layers, \ $CellContext`dir} = $CellContext`moveXYZ; Assert[1 <= $CellContext`axis <= 3, "axis in rotateLayers"]; Assert[2 <= $CellContext`dir <= 5, "dir in rotateLayers"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in rotateLayers"]; $CellContext`laylist = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layers]; For[$CellContext`ix = 1, $CellContext`ix <= Length[$CellContext`laylist], Increment[$CellContext`ix], $CellContext`newCubeState = \ $CellContext`rotateOneLayer[$CellContext`nx, $CellContext`axis, Part[$CellContext`laylist, $CellContext`ix], $CellContext`dir, \ $CellContext`newCubeState]]; $CellContext`newCubeState], \ $CellContext`mfCleanLLQ[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layerlist, Blank[]]] := $CellContext`layerlist === \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`layerlist], \ $CellContext`mfMoveFRU2XYZ[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveFRU, Blank[]]] := Module[{$CellContext`face = Part[$CellContext`moveFRU, 1], $CellContext`layersFRU = Part[$CellContext`moveFRU, 2], $CellContext`dirFRU = Part[$CellContext`moveFRU, 3], $CellContext`laylist, $CellContext`laylistc, \ $CellContext`moveXYZ}, Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layersFRU], "layersFRU in mfMoveFRU2XYZ"]; {$CellContext`laylist, \ $CellContext`laylistc} = $CellContext`mfLayersAndCompl[$CellContext`nx, \ $CellContext`layersFRU]; $CellContext`moveXYZ = If[$CellContext`face <= 6, {$CellContext`face - 3, $CellContext`laylistc, $CellContext`dirFRU}, \ {$CellContext`face - 6, $CellContext`laylist, $CellContext`mfOppositeDir[$CellContext`dirFRU]}]; \ $CellContext`moveXYZ], $CellContext`rotateOneLayer[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`axis, Blank[]], Pattern[$CellContext`layerix, Blank[]], Pattern[$CellContext`angleix, Blank[]], Pattern[$CellContext`oldCubeState, Blank[]], Optional[ Pattern[$CellContext`skiprot, Blank[]], False]] := Module[{$CellContext`newCubeState, $CellContext`angIx, \ $CellContext`oldLayer, $CellContext`intermediateLayer, $CellContext`newLayer, \ $CellContext`transArray, $CellContext`i1, $CellContext`j1, $CellContext`ix1, \ $CellContext`ix2, $CellContext`ix3}, Assert[1 <= $CellContext`layerix <= $CellContext`nx, "layerix in rotateOneLayer"]; $CellContext`oldLayer = Switch[$CellContext`axis, 1, Part[$CellContext`oldCubeState, $CellContext`layerix, All, All], 2, Part[$CellContext`oldCubeState, All, $CellContext`layerix, All], 3, Part[$CellContext`oldCubeState, All, All, $CellContext`layerix]]; $CellContext`angIx = If[$CellContext`axis == 2, $CellContext`mfOppositeDir[$CellContext`angleix], \ $CellContext`angleix]; $CellContext`transArray = \ $CellContext`layerTranslationMatrix[$CellContext`nx, $CellContext`angIx]; \ $CellContext`intermediateLayer = Table[{$CellContext`i1, $CellContext`j1} = Part[$CellContext`transArray, $CellContext`i, $CellContext`j]; Part[$CellContext`oldLayer, $CellContext`i1, $CellContext`j1], \ {$CellContext`i, $CellContext`nx}, {$CellContext`j, $CellContext`nx}]; If[$CellContext`skiprot, $CellContext`newLayer = \ $CellContext`intermediateLayer, $CellContext`ix1 = $CellContext`axis; \ $CellContext`ix3 = $CellContext`angleix; $CellContext`newLayer = Table[$CellContext`ix2 = Part[$CellContext`intermediateLayer, $CellContext`i, \ $CellContext`j]; Part[$CellContext`gcInPlaceRotTable, $CellContext`ix1, \ $CellContext`ix2, $CellContext`ix3], {$CellContext`i, $CellContext`nx}, \ {$CellContext`j, $CellContext`nx}]]; $CellContext`newCubeState = \ $CellContext`oldCubeState; Switch[$CellContext`axis, 1, Part[$CellContext`newCubeState, $CellContext`layerix, All, All] = $CellContext`newLayer, 2, Part[$CellContext`newCubeState, All, $CellContext`layerix, All] = $CellContext`newLayer, 3, Part[$CellContext`newCubeState, All, All, $CellContext`layerix] = $CellContext`newLayer]; \ $CellContext`newCubeState], $CellContext`layerTranslationMatrix[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`dirix, Blank[]]] := \ ($CellContext`layerTranslationMatrix[$CellContext`nx, $CellContext`dirix] = Module[{$CellContext`shift, $CellContext`b, $CellContext`c}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in layerTranslationMatrix"]; Assert[1 <= $CellContext`dirix <= 5, "dirix in layerTranslationMatrix"]; $CellContext`shift = ConstantArray[{($CellContext`nx + 1)/2, ($CellContext`nx + 1)/ 2}, {$CellContext`nx, $CellContext`nx}]; $CellContext`b = Array[List, {$CellContext`nx, $CellContext`nx}] - \ $CellContext`shift; $CellContext`c = Table[ Dot[ $CellContext`rotMatrix2x2[$CellContext`dirix], Part[$CellContext`b, $CellContext`i, $CellContext`j]], \ {$CellContext`i, $CellContext`nx}, {$CellContext`j, $CellContext`nx}]; \ $CellContext`c + $CellContext`shift]), $CellContext`rotMatrix2x2[ Condition[ Pattern[$CellContext`angleix, Blank[Integer]], 1 <= $CellContext`angleix <= 5]] := ($CellContext`rotMatrix2x2[$CellContext`angleix] = Module[{$CellContext`angle, $CellContext`s, $CellContext`c}, \ $CellContext`angle = Part[{0, Pi/2, Pi, -Pi/2, - Pi}, $CellContext`angleix]; $CellContext`s = Sin[$CellContext`angle]; $CellContext`c = Cos[$CellContext`angle]; {{$CellContext`c, $CellContext`s}, \ {-$CellContext`s, $CellContext`c}}]), $CellContext`gcInPlaceRotTable = \ CompressedData[" 1:eJwVjLdxxEAQBP+01ncAXKbEED4B5u+xYWzVqN6f79/vV30+n/ceznDCJZOk jzqqkG3WSG8IncUHSmEopaZUFuElkRO4oMq6+lX3M5927nF3/BrIMwk3ZemU dVK2gVsFcRrRrsKOMqSZbSrda+dUxclGLoqL9759ftYT0nUunNuIcIj8KsC2 wunGBwOqFZQV8EYuuLz5EA/wS6UAHx1o9qIef2TZYau23NLjSY/pd77tvOLl CNu7qYFNiYQzsRmZTYeSAV54UOWgTIbXCdRGoqZYFMmiCqJpWXTDYuh/xosT Xg== "], $CellContext`handleAbort[ Pattern[$CellContext`maMoves, Blank[]], Pattern[$CellContext`maMovesIx, Blank[]]] := Module[{$CellContext`mlMoves, $CellContext`mlNumMoves, \ $CellContext`mlAbortFlag, $CellContext`mlFreeze, $CellContext`mlReady, \ $CellContext`mlForceRings}, $CellContext`mlMoves = Take[$CellContext`maMoves, Max[0, $CellContext`maMovesIx - 1]]; $CellContext`mlNumMoves = Length[$CellContext`mlMoves]; $CellContext`mlAbortFlag = False; $CellContext`mlFreeze = False; $CellContext`mlReady = True; $CellContext`mlForceRings = False; {$CellContext`mlMoves, $CellContext`mlNumMoves, \ $CellContext`mlAbortFlag, $CellContext`mlFreeze, $CellContext`mlReady, \ $CellContext`mlForceRings}], $CellContext`normalMoveQ[ Pattern[$CellContext`move, Blank[]]] := 1 <= First[$CellContext`move] <= $CellContext`gcMaxFaceIx, \ $CellContext`logOneMove[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`move$, Blank[]]] := (If[$CellContext`gsHistTraversing == 0, $CellContext`histAddOneMove[$CellContext`nx$, $CellContext`move$], AddTo[$CellContext`gsHistPtr, $CellContext`gsHistTraversing]]; If[$CellContext`cvRecOn$$, $CellContext`recAddOneMove[$CellContext`move$]]; Null), $CellContext`specialAction[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`move$, Blank[]]] := Module[{$CellContext`action$, $CellContext`param2$, \ $CellContext`param3$, $CellContext`p21$, $CellContext`param2list$}, \ {$CellContext`action$, $CellContext`param2$, $CellContext`param3$} = \ $CellContext`move$; $CellContext`p21$ = If[Length[$CellContext`param2$] > 0, First[$CellContext`param2$], 0]; If[$CellContext`action$ < 100, Return[]]; Switch[$CellContext`action$, $CellContext`xsaPause, Pause[ Clip[$CellContext`p21$, {10, 5000}]/ 1000.], $CellContext`xsaViewOpt, $CellContext`cvViewOpt$$ = Clip[$CellContext`p21$, {1, 3}], $CellContext`xsaShowCores, $CellContext`cvShowCores$$ = \ $CellContext`p21$ != 0, $CellContext`xsaSolvedCube, $CellContext`cvCubeState$$ = \ $CellContext`solvedCube[$CellContext`nx$, 1], $CellContext`xsaSubcubeSize, $CellContext`cvSubcubeSize$$ = Clip[$CellContext`p21$, {$CellContext`gcMinSubcubeSize, \ $CellContext`gcMaxSubcubeSize}], $CellContext`xsaSelectFace, \ $CellContext`cvSelectedFace$$ = $CellContext`p21$, \ $CellContext`xsaSelectLayers, $CellContext`cvSelectedLayersFRU$$ = \ $CellContext`param2$, $CellContext`xsaClearLayers, \ $CellContext`cvSelectedLayersFRU$$ = {}, $CellContext`xsaChangeFaceColors, \ {$CellContext`cvFaceC1$$, $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, \ $CellContext`cvFaceC4$$, $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-$CellContext`p21$, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], \ $CellContext`xsaAltFaceColors, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[$CellContext`p21$ + 60], $CellContext`xsaPermuteColors, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$} = \ $CellContext`changeFaceColors[-$CellContext`p21$, {$CellContext`cvFaceC1$$, \ $CellContext`cvFaceC2$$, $CellContext`cvFaceC3$$, $CellContext`cvFaceC4$$, \ $CellContext`cvFaceC5$$, $CellContext`cvFaceC6$$}], \ $CellContext`xsaBkgdColor, $CellContext`cvBkgdColor$$ = Apply[RGBColor, $CellContext`param2$/ 100.], $CellContext`xsaEdgeColor, $CellContext`cvEdgeColor$$ = Apply[RGBColor, $CellContext`param2$/ 100.], $CellContext`xsaRingColor, $CellContext`cvRingColor$$ = Apply[RGBColor, $CellContext`param2$/ 100.], $CellContext`xsaEdgeTh, $CellContext`cvEdgeTh$$ = \ $CellContext`p21$, $CellContext`xsaRingTh, $CellContext`cvRingTh$$ = \ $CellContext`p21$, $CellContext`xsaResetThColors, {$CellContext`cvEdgeTh$$, \ $CellContext`cvRingTh$$, $CellContext`cvEdgeColor$$, \ $CellContext`cvRingColor$$, $CellContext`cvBkgdColor$$} = \ {$CellContext`gcDfltEdgeTh, $CellContext`gcDfltRingTh, \ $CellContext`gcDfltEdgeColor, $CellContext`gcDfltRingColor, \ $CellContext`gcDfltBkgdColor}, $CellContext`xsaShowRings, \ $CellContext`cvShowRings$$ = ($CellContext`cvShowRingsTemp$$ = \ $CellContext`p21$ != 0), $CellContext`xsaForceRings, $CellContext`cvForceRings$$ = \ $CellContext`p21$ != 0, $CellContext`xsaClearForceRings, $CellContext`cvForceRings$$ = \ ($CellContext`cvShowRingsTemp$$ = False), $CellContext`xsaInvis, $CellContext`param2list$ = \ $CellContext`mfCleanLayers[$CellContext`nx$, $CellContext`param2$]; \ $CellContext`param3$ = Clip[ Part[$CellContext`move$, 3], {1, 3}]; Which[$CellContext`param3$ == 1, $CellContext`cvXInvis$$ = $CellContext`param2list$, \ $CellContext`param3$ == 2, $CellContext`cvYInvis$$ = $CellContext`param2list$, \ $CellContext`param3$ == 3, $CellContext`cvZInvis$$ = $CellContext`param2list$], \ $CellContext`xsaClearInvis, $CellContext`cvXInvis$$ = \ ($CellContext`cvYInvis$$ = ($CellContext`cvZInvis$$ = {})), \ $CellContext`xsaWireFrame, $CellContext`cvWireFrame$$ = $CellContext`p21$ != 0, $CellContext`xsaShowMisAl, $CellContext`cvShowMisAl3$$ = \ $CellContext`p21$, $CellContext`xsaViewPtAngle, $CellContext`cvViewPtAngle$$ = { Part[$CellContext`gcViewPtAngleValuesHoriz, Part[$CellContext`param2$, 1]], Part[$CellContext`gcViewPtAngleValuesVert, Part[$CellContext`param2$, 2]]}, $CellContext`xsaViewPtMult, \ $CellContext`cvViewPtMult$$ = Part[$CellContext`gcViewPtMultValues, $CellContext`p21$], \ $CellContext`xsaViewPtReset, {$CellContext`cvViewPtAngle$$, \ $CellContext`cvViewPtMult$$} = {$CellContext`gcViewPtAngleInit, \ $CellContext`gcViewPtMultInit}, $CellContext`xsaNumSteps, \ $CellContext`cvNumStepsNext$$ = Clip[$CellContext`p21$, {1, 8}], $CellContext`xsaNumHist, Null, Blank[], Null]; Null], $CellContext`xsaPause = 113, $CellContext`xsaViewOpt = 126, $CellContext`xsaShowCores = 121, $CellContext`xsaSolvedCube = 124, $CellContext`xsaSubcubeSize = 125, $CellContext`gcMinSubcubeSize = 40, $CellContext`gcMaxSubcubeSize = 100, $CellContext`xsaSelectFace = 118, $CellContext`xsaSelectLayers = 119, $CellContext`xsaClearLayers = 106, $CellContext`xsaChangeFaceColors = 103, $CellContext`changeFaceColors[ Pattern[$CellContext`opt, Blank[]], Optional[ Pattern[$CellContext`newScfc, Blank[]], {}]] := Module[{$CellContext`fc, $CellContext`h}, Assert[ Or[-9 <= $CellContext`opt <= -1, 61 <= $CellContext`opt <= 72], "opt in changeFaceColors"]; $CellContext`h = If[Length[$CellContext`newScfc] == 6, True, False, False]; $CellContext`fc = Which[$CellContext`opt == -1, $CellContext`gcDefaultFaceColors, \ $CellContext`opt == -2, Apply[RGBColor, Round[ RandomReal[1, {6, 3}], 0.001], { 1}], $CellContext`opt == -3, $CellContext`gcGrayTable, And[$CellContext`h, $CellContext`opt == -4], \ $CellContext`newScfc, And[$CellContext`h, $CellContext`opt == -5], RandomSample[$CellContext`newScfc, 6], And[$CellContext`h, $CellContext`opt == -6], Part[$CellContext`newScfc, {4, 1, 2, 5, 6, 3}], And[$CellContext`h, $CellContext`opt == -7], Part[$CellContext`newScfc, {2, 3, 6, 1, 4, 5}], And[$CellContext`h, $CellContext`opt == -8], Part[$CellContext`newScfc, {4, 5, 6, 1, 2, 3}], And[$CellContext`h, $CellContext`opt == -9], Part[$CellContext`newScfc, {3, 1, 2, 6, 4, 5}], 61 <= $CellContext`opt <= 72, $CellContext`getSixAltColors[$CellContext`opt - 60], True, $CellContext`gcDefaultFaceColors]; $CellContext`fc], \ $CellContext`gcDefaultFaceColors = { RGBColor[1, 1, 0], RGBColor[1, 0, 0], RGBColor[0, 0, 1], RGBColor[0.29, 0.47, 0.48], RGBColor[0.8, 0.6, 0], RGBColor[1, 1, 1]}, $CellContext`gcGrayTable = { GrayLevel[0.], GrayLevel[0.4], GrayLevel[0.8], GrayLevel[0.2], GrayLevel[0.6000000000000001], GrayLevel[1.]}, $CellContext`getSixAltColors[1] = { RGBColor[0., 1., 1.], RGBColor[1., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[0., 0.8, 0.5], RGBColor[0.7000000000000001, 0.8, 0.], RGBColor[0.5, 0.5, 1.]}, $CellContext`getSixAltColors[2] = { RGBColor[0., 0., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[1., 1., 1.], RGBColor[0., 1., 1.], RGBColor[0., 1., 0.], RGBColor[0., 0., 0.]}, $CellContext`getSixAltColors[3] = { RGBColor[1., 0., 0.], RGBColor[0., 0., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0., 1.], RGBColor[1., 1., 0.]}, $CellContext`getSixAltColors[4] = { RGBColor[0.2, 1., 1.], RGBColor[0.2, 0.8, 1.], RGBColor[0.2, 0.6000000000000001, 0.2], RGBColor[0.2, 0.30000000000000004`, 0.6000000000000001], RGBColor[0.2, 1., 0.2], RGBColor[0.2, 0., 1.]}, $CellContext`getSixAltColors[5] = { RGBColor[0.5, 0., 0.], RGBColor[0.5, 0.5, 1.], RGBColor[0.5, 0., 1.], RGBColor[0.5, 0.5, 0.], RGBColor[0.5, 1., 1.], RGBColor[0.5, 1., 0.]}, $CellContext`getSixAltColors[6] = { RGBColor[1., 0., 0.], RGBColor[1., 0., 0.8], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[1., 1., 1.], RGBColor[ 0.2, 0.4, 0.6000000000000001]}, $CellContext`getSixAltColors[7] = { RGBColor[0., 0.8, 0.], RGBColor[1., 1., 0.], RGBColor[1., 0., 0.], RGBColor[0., 1., 1.], RGBColor[0., 0., 0.5], RGBColor[0., 0., 1.]}, $CellContext`getSixAltColors[8] = { RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[0., 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[1., 1., 1.]}, $CellContext`getSixAltColors[9] = { RGBColor[1., 0.2, 0.2], RGBColor[1., 0.5, 0.], RGBColor[1., 1., 0.], RGBColor[0.6000000000000001, 0.9, 0.6000000000000001], RGBColor[0.7000000000000001, 0.7000000000000001, 1.], RGBColor[0.8, 0., 0.8]}, $CellContext`getSixAltColors[10] = { RGBColor[1., 0., 0.], RGBColor[0., 1., 0.], RGBColor[0., 0., 1.], RGBColor[1., 0.8, 0.8], RGBColor[0.8, 1., 0.8], RGBColor[0.8, 0.8, 1.]}, $CellContext`getSixAltColors[11] = { RGBColor[0., 0.9, 0.9], RGBColor[1., 0., 1.], RGBColor[1., 1., 0.], RGBColor[0.9, 1., 1.], RGBColor[1., 0.6000000000000001, 1.], RGBColor[1., 1., 0.8]}, $CellContext`getSixAltColors[12] = { RGBColor[0.8, 0., 0.], RGBColor[0., 0.8, 0.], RGBColor[0., 0., 0.8], RGBColor[0.7000000000000001, 0.5, 0.2], RGBColor[0.7000000000000001, 1., 0.7000000000000001], RGBColor[ 0.6000000000000001, 0.6000000000000001, 0.8]}, $CellContext`getSixAltColors[ Optional[ Pattern[$CellContext`ix, Blank[Integer]], 1]] := ($CellContext`getSixAltColors[$CellContext`ix] = Apply[RGBColor, Part[$CellContext`gcAltFaceColorsData, $CellContext`ix]/10., { 1}]), $CellContext`gcAltFaceColorsData = {{{0, 10, 10}, {10, 10, 10}, {0, 0, 5}, {0, 8, 5}, {7, 8, 0}, {5, 5, 10}}, {{0, 0, 10}, {10, 6, 10}, {10, 10, 10}, {0, 10, 10}, {0, 10, 0}, {0, 0, 0}}, {{10, 0, 0}, {0, 0, 0}, {0, 0, 10}, {0, 10, 10}, {10, 0, 10}, {10, 10, 0}}, {{2, 10, 10}, {2, 8, 10}, {2, 6, 2}, {2, 3, 6}, {2, 10, 2}, {2, 0, 10}}, {{5, 0, 0}, {5, 5, 10}, {5, 0, 10}, {5, 5, 0}, {5, 10, 10}, {5, 10, 0}}, {{10, 0, 0}, {10, 0, 8}, {10, 5, 0}, {10, 10, 0}, {10, 10, 10}, {2, 4, 6}}, {{0, 8, 0}, {10, 10, 0}, {10, 0, 0}, { 0, 10, 10}, {0, 0, 5}, {0, 0, 10}}, {{10, 0, 0}, {0, 10, 0}, {0, 0, 10}, {0, 10, 10}, {10, 6, 10}, {10, 10, 10}}, {{10, 2, 2}, {10, 5, 0}, {10, 10, 0}, {6, 9, 6}, {7, 7, 10}, {8, 0, 8}}, {{10, 0, 0}, {0, 10, 0}, {0, 0, 10}, {10, 8, 8}, {8, 10, 8}, {8, 8, 10}}, {{0, 9, 9}, {10, 0, 10}, {10, 10, 0}, {9, 10, 10}, {10, 6, 10}, {10, 10, 8}}, {{8, 0, 0}, {0, 8, 0}, {0, 0, 8}, {7, 5, 2}, {7, 10, 7}, {6, 6, 8}}}, $CellContext`xsaAltFaceColors = 101, $CellContext`xsaPermuteColors = 114, $CellContext`xsaBkgdColor = 102, $CellContext`xsaEdgeColor = 107, $CellContext`xsaRingColor = 116, $CellContext`xsaEdgeTh = 108, $CellContext`xsaRingTh = 117, $CellContext`xsaResetThColors = 115, $CellContext`gcDfltEdgeTh = 4, $CellContext`gcDfltRingTh = 3, $CellContext`gcDfltEdgeColor = GrayLevel[0], $CellContext`gcDfltRingColor = RGBColor[0.94, 0.88, 0.94], $CellContext`gcDfltBkgdColor = GrayLevel[0.85], $CellContext`xsaShowRings = 123, $CellContext`xsaForceRings = 109, $CellContext`xsaClearForceRings = 104, $CellContext`xsaInvis = 110, $CellContext`xsaClearInvis = 105, $CellContext`xsaWireFrame = 130, $CellContext`xsaShowMisAl = 122, $CellContext`xsaViewPtAngle = 127, $CellContext`gcViewPtAngleValuesHoriz = {0.2617993877991494, 0.3490658503988659, 0.4363323129985824, 0.5235987755982988, 0.6108652381980153, 0.6981317007977318, 0.7853981633974483, 0.8726646259971648, 0.9599310885968813, 1.0471975511965976`, 1.1344640137963142`, 1.2217304763960306`, 1.3089969389957472`}, $CellContext`gcViewPtAngleValuesVert = { 1.3043824685233751`, 1.2171160059236588`, 1.1298495433239422`, 1.0425830807242258`, 0.9553166181245093, 0.8680501555247928, 0.7807836929250763, 0.6935172303253598, 0.6062507677256433, 0.5189843051259269, 0.4317178425262104, 0.34445137992649394`, 0.25718491732677745`}, $CellContext`xsaViewPtMult = 128, $CellContext`gcViewPtMultValues = {2.5, 2.6, 2.8, 3., 4., 5.5, 8., 12.}, $CellContext`xsaViewPtReset = 129, $CellContext`gcViewPtAngleInit = {0.7853981633974483, 0.9553166181245093}, $CellContext`gcViewPtMultInit = 3., $CellContext`xsaNumSteps = 112, $CellContext`xsaNumHist = 111, $CellContext`finishMove[ Pattern[$CellContext`maNx, Blank[]], Pattern[$CellContext`maSelectedFace, Blank[]], Pattern[$CellContext`maSelectedLayersFRU, Blank[]]] := Module[{$CellContext`mlCurrAxisXYZ, $CellContext`mlCurrLayerListXYZ, \ $CellContext`mlRotAngle}, {$CellContext`mlCurrAxisXYZ, \ $CellContext`mlCurrLayerListXYZ} = \ $CellContext`getAxisLayersXYZ[$CellContext`maNx, $CellContext`maSelectedFace, \ $CellContext`maSelectedLayersFRU]; $CellContext`mlRotAngle = 0.; {$CellContext`mlCurrAxisXYZ, $CellContext`mlCurrLayerListXYZ, \ $CellContext`mlRotAngle}], $CellContext`mfGetXYZParts[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`move, Blank[]]] := Module[{$CellContext`mvx, $CellContext`facein = Part[$CellContext`move, 1], $CellContext`layersin = Part[$CellContext`move, 2]}, Assert[ 1 <= $CellContext`facein <= $CellContext`gcMaxFaceIx, "facein in mfGetXYZParts"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layersin], "layersin in mfGetXYZParts"]; If[$CellContext`facein > 9, Print["mfGetXYZParts: nx = ", $CellContext`nx, " move = ", $CellContext`move, " facein = ", $CellContext`facein]; Null]; $CellContext`mvx = If[1 <= $CellContext`facein <= 3, $CellContext`move, $CellContext`mfMoveFRU2XYZ[$CellContext`nx, $CellContext`move]]; { Part[$CellContext`mvx, 1], $CellContext`mfCleanLayers[$CellContext`nx, Part[$CellContext`mvx, 2]], Part[$CellContext`mvx, 3]}], $CellContext`calcRotAngle[ Pattern[$CellContext`dirix, Blank[Integer]], Pattern[$CellContext`numsteps, Blank[Integer]], Pattern[$CellContext`turnix, Blank[Integer]], Optional[ Pattern[$CellContext`exact, Blank[]], False]] := ($CellContext`calcRotAngle[$CellContext`dirix, \ $CellContext`numsteps, $CellContext`turnix, $CellContext`exact] = Module[{$CellContext`temp, $CellContext`angleRad}, Assert[1 <= $CellContext`dirix <= 5, "dirix in calcRotAngle"]; $CellContext`temp = Switch[$CellContext`dirix, 1, 0, 2, (2 $CellContext`numsteps - $CellContext`turnix + 1)/2, 3, 2 $CellContext`numsteps - $CellContext`turnix, 4, -(2 $CellContext`numsteps - $CellContext`turnix + 1)/2, 5, -(2 $CellContext`numsteps - $CellContext`turnix)]; \ $CellContext`angleRad = $CellContext`temp (Pi/(2 $CellContext`numsteps)); If[$CellContext`exact, $CellContext`angleRad, N[$CellContext`angleRad]]]), $CellContext`displayGraphics[ Pattern[$CellContext`maNx, Blank[]], Pattern[$CellContext`maOldNx, Blank[]], Pattern[$CellContext`maCubeState, Blank[]], Pattern[$CellContext`maSolvedOri, Blank[]], Pattern[$CellContext`maNumSteps, Blank[]], Pattern[$CellContext`maNumStepsNext, Blank[]], Pattern[$CellContext`maSeqAnimOn, Blank[]], Pattern[$CellContext`maRotAngle, Blank[]], Pattern[$CellContext`maRevSeqs, Blank[]], Pattern[$CellContext`maAbortFlag, Blank[]], Pattern[$CellContext`maFreeze, Blank[]], Pattern[$CellContext`maViewOpt, Blank[]], Pattern[$CellContext`maShowCores, Blank[]], Pattern[$CellContext`maWindowWidth, Blank[]], Pattern[$CellContext`maSubcubeSize, Blank[]], Pattern[$CellContext`maCurrAxisXYZ, Blank[]], Pattern[$CellContext`maCurrLayerListXYZ, Blank[]], Pattern[$CellContext`maShowRings, Blank[]], Pattern[$CellContext`maShowRingsTemp, Blank[]], Pattern[$CellContext`maForceRings, Blank[]], Pattern[$CellContext`maXInvis, Blank[]], Pattern[$CellContext`maYInvis, Blank[]], Pattern[$CellContext`maZInvis, Blank[]], Pattern[$CellContext`maWireFrame, Blank[]], Pattern[$CellContext`maShowMisAl3, Blank[]], Pattern[$CellContext`maRecOn, Blank[]], Pattern[$CellContext`maIxUds, Blank[]], Pattern[$CellContext`maUdsDeleteOK, Blank[]], Pattern[$CellContext`maUdsExecuteOK, Blank[]], Pattern[$CellContext`maUdsOverwriteOK, Blank[]], Pattern[$CellContext`maUdsSaveOK, Blank[]], Pattern[$CellContext`maFaceC1, Blank[]], Pattern[$CellContext`maFaceC2, Blank[]], Pattern[$CellContext`maFaceC3, Blank[]], Pattern[$CellContext`maFaceC4, Blank[]], Pattern[$CellContext`maFaceC5, Blank[]], Pattern[$CellContext`maFaceC6, Blank[]], Pattern[$CellContext`maEdgeTh, Blank[]], Pattern[$CellContext`maRingTh, Blank[]], Pattern[$CellContext`maEdgeColor, Blank[]], Pattern[$CellContext`maRingColor, Blank[]], Pattern[$CellContext`maBkgdColor, Blank[]], Pattern[$CellContext`maViewPtAngle, Blank[]], Pattern[$CellContext`maViewPtMult, Blank[]], Pattern[$CellContext`maNumHist, Blank[]], Pattern[$CellContext`maClearHist, Blank[]], Pattern[$CellContext`maShowFrames, Blank[]]] := Module[{$CellContext`bkgdCol1, $CellContext`bkgdCol2, \ $CellContext`winw, $CellContext`ttlw, $CellContext`fnw, $CellContext`frs, \ $CellContext`frw, $CellContext`sepw, $CellContext`seph, $CellContext`dispw, \ $CellContext`disph, $CellContext`fcsz, $CellContext`viewptFront, \ $CellContext`viewptBack, $CellContext`coresizes, $CellContext`cubePlotRules, \ $CellContext`cubeFrameRules, $CellContext`viewLabelRules, \ $CellContext`histFrameRules, $CellContext`vertDiv, \ $CellContext`infoFrameRules, $CellContext`testlines, $CellContext`hlines, \ $CellContext`cubeAndCores, $CellContext`cubeFront, $CellContext`cubeBack, \ $CellContext`graphicsOut}, $CellContext`debugElapsedTime = AbsoluteTime[] - $CellContext`debugStartTime; \ {$CellContext`viewptFront, $CellContext`viewptBack} = \ $CellContext`calcViewpoints[$CellContext`maViewPtAngle, \ $CellContext`maViewPtMult]; $CellContext`bkgdCol1 = $CellContext`maBkgdColor; \ $CellContext`bkgdCol2 = Blend[{$CellContext`bkgdCol1, Blue}, 0.05]; $CellContext`infoFrameRules = { Alignment -> {Left, Center}, BaseStyle -> { Background -> $CellContext`bkgdCol2}}; \ $CellContext`cubeFrameRules = { Alignment -> {Center, Center}, BaseStyle -> { Background -> $CellContext`bkgdCol1}}; \ $CellContext`viewLabelRules = { Alignment -> {Center, Center}, BaseStyle -> { Background -> $CellContext`bkgdCol2}}; $CellContext`vertDiv = { Alignment -> {Center, Center}, BaseStyle -> { Background -> Blue}}; $CellContext`histFrameRules = { Alignment -> {Left, Center}, FrameMargins -> {{5, 5}, {0, 5}}, BaseStyle -> { Background -> $CellContext`bkgdCol2}}; \ $CellContext`cubePlotRules = { ViewVertical -> {0, 0, 1}, Lighting -> {{"Ambient", White}}, Boxed -> $CellContext`gcBoxedDisplay, Axes -> $CellContext`gcDrawAxes, SphericalRegion -> True, Background -> $CellContext`bkgdCol1}; $CellContext`coresizes = Range[$CellContext`maNx, 1, -2]; {$CellContext`winw, $CellContext`ttlw, \ $CellContext`fnw, $CellContext`frs, $CellContext`frw, $CellContext`sepw, \ $CellContext`seph, $CellContext`dispw, $CellContext`disph, $CellContext`fcsz} = \ $CellContext`computeDisplayWidths[$CellContext`maNx, $CellContext`maViewOpt, \ $CellContext`maShowCores, $CellContext`maWindowWidth]; $CellContext`testlines = \ $CellContext`buildInfoPanel[$CellContext`maNx, $CellContext`maCubeState, \ $CellContext`maRecOn, $CellContext`fnw]; $CellContext`hlines = \ $CellContext`buildHistoryLines[$CellContext`maNx]; $CellContext`cubeAndCores = \ $CellContext`buildCubeAndCores[{}, $CellContext`maNx, \ $CellContext`maCubeState, $CellContext`maRotAngle, $CellContext`maViewOpt, \ $CellContext`maShowCores, $CellContext`maWindowWidth, \ $CellContext`maSubcubeSize, $CellContext`maCurrAxisXYZ, \ $CellContext`maCurrLayerListXYZ, $CellContext`maShowRings, \ $CellContext`maShowRingsTemp, $CellContext`maForceRings, \ $CellContext`maXInvis, $CellContext`maYInvis, $CellContext`maZInvis, \ $CellContext`maWireFrame, $CellContext`maShowMisAl3, $CellContext`maRecOn, \ $CellContext`maIxUds, $CellContext`maFaceC1, $CellContext`maFaceC2, \ $CellContext`maFaceC3, $CellContext`maFaceC4, $CellContext`maFaceC5, \ $CellContext`maFaceC6, $CellContext`maEdgeTh, $CellContext`maRingTh, \ $CellContext`maEdgeColor, $CellContext`maRingColor, $CellContext`maBkgdColor, \ $CellContext`maViewPtAngle, $CellContext`maViewPtMult, \ $CellContext`maShowFrames, False]; $CellContext`graphicsOut = Switch[$CellContext`maViewOpt, 1, $CellContext`cubeFront = Table[ Graphics3D[{ Part[$CellContext`cubeAndCores, ($CellContext`maNx - \ $CellContext`s)/2 + 1]}, $CellContext`cubePlotRules, ViewPoint -> $CellContext`viewptFront, PlotRange -> 100 Sqrt[2] $CellContext`s, ImageSize -> ($CellContext`s/$CellContext`maNx) \ $CellContext`fcsz, Prolog -> If[$CellContext`s == $CellContext`maNx, $CellContext`getFaceLabels[ 1, $CellContext`maViewOpt], {}]], {$CellContext`s, \ $CellContext`coresizes}]; Framed[ Column[{ Framed[$CellContext`testlines, $CellContext`infoFrameRules, ImageSize -> $CellContext`fnw, FrameMargins -> 10, FrameStyle -> None], Framed[ Style[ "Front View", Bold, 16, FontFamily -> "Arial"], $CellContext`viewLabelRules, ImageSize -> $CellContext`ttlw, FrameMargins -> 0], $CellContext`dispCubes[$CellContext`cubeFront, \ $CellContext`maNx, $CellContext`cubeFrameRules, $CellContext`frw, \ $CellContext`maShowCores, $CellContext`maShowFrames, 1], Framed[$CellContext`hlines, $CellContext`histFrameRules, ImageSize -> {$CellContext`fnw, 20 $CellContext`gcHistMaxDisplayLines}]}, Center, 0], Background -> $CellContext`bkgdCol1], 2, $CellContext`cubeBack = Table[ Graphics3D[{ Part[$CellContext`cubeAndCores, ($CellContext`maNx - \ $CellContext`s)/2 + 1]}, $CellContext`cubePlotRules, ViewPoint -> $CellContext`viewptBack, PlotRange -> 100 Sqrt[2] $CellContext`s, ImageSize -> ($CellContext`s/$CellContext`maNx) \ $CellContext`fcsz, Prolog -> If[$CellContext`s == $CellContext`maNx, $CellContext`getFaceLabels[ 2, $CellContext`maViewOpt], {}]], {$CellContext`s, \ $CellContext`coresizes}]; Framed[ Column[{ Framed[$CellContext`testlines, $CellContext`infoFrameRules, ImageSize -> $CellContext`fnw, FrameMargins -> 10, FrameStyle -> None], Framed[ Style[ "Back View", Bold, 16, FontFamily -> "Arial"], $CellContext`viewLabelRules, ImageSize -> $CellContext`ttlw, FrameMargins -> 0], $CellContext`dispCubes[$CellContext`cubeBack, \ $CellContext`maNx, $CellContext`cubeFrameRules, $CellContext`frw, \ $CellContext`maShowCores, $CellContext`maShowFrames, 1], Framed[$CellContext`hlines, $CellContext`histFrameRules, ImageSize -> {$CellContext`fnw, 20 $CellContext`gcHistMaxDisplayLines}]}, Center, 0], Background -> $CellContext`bkgdCol1], 3, $CellContext`cubeFront = Table[ Graphics3D[{ Part[$CellContext`cubeAndCores, ($CellContext`maNx - \ $CellContext`s)/2 + 1]}, $CellContext`cubePlotRules, ViewPoint -> $CellContext`viewptFront, PlotRange -> 100 Sqrt[2] $CellContext`s, ImageSize -> ($CellContext`s/$CellContext`maNx) \ $CellContext`fcsz, Prolog -> If[$CellContext`s == $CellContext`maNx, $CellContext`getFaceLabels[ 1, $CellContext`maViewOpt], {}]], {$CellContext`s, \ $CellContext`coresizes}]; $CellContext`cubeBack = Table[ Graphics3D[{ Part[$CellContext`cubeAndCores, ($CellContext`maNx - \ $CellContext`s)/2 + 1]}, $CellContext`cubePlotRules, ViewPoint -> $CellContext`viewptBack, PlotRange -> 100 Sqrt[2] $CellContext`s, ImageSize -> ($CellContext`s/$CellContext`maNx) \ $CellContext`fcsz, Prolog -> If[$CellContext`s == $CellContext`maNx, $CellContext`getFaceLabels[ 2, $CellContext`maViewOpt], {}]], {$CellContext`s, \ $CellContext`coresizes}]; Framed[ Column[{ Framed[$CellContext`testlines, $CellContext`infoFrameRules, ImageSize -> $CellContext`fnw, FrameMargins -> 10, FrameStyle -> None], Grid[{{ Framed[ Style[ "Back View", Bold, 16, FontFamily -> "Arial"], $CellContext`viewLabelRules, ImageSize -> $CellContext`ttlw, FrameMargins -> 0], Framed[ "", $CellContext`cubeFrameRules, ImageSize -> {$CellContext`sepw, $CellContext`sepw}, FrameMargins -> 0, FrameStyle -> None], Framed[ Style[ "Front View", Bold, 16, FontFamily -> "Arial"], $CellContext`viewLabelRules, ImageSize -> $CellContext`ttlw, FrameMargins -> 0]}, { $CellContext`dispCubes[$CellContext`cubeBack, \ $CellContext`maNx, $CellContext`cubeFrameRules, $CellContext`frw, \ $CellContext`maShowCores, $CellContext`maShowFrames, 2], Framed[ "", $CellContext`vertDiv, ImageSize -> {$CellContext`sepw, $CellContext`seph - \ $CellContext`sepw}, FrameMargins -> 0, FrameStyle -> None], $CellContext`dispCubes[$CellContext`cubeFront, \ $CellContext`maNx, $CellContext`cubeFrameRules, $CellContext`frw, \ $CellContext`maShowCores, $CellContext`maShowFrames, 2]}}, Alignment -> {Center, Center}, Spacings -> 0, Frame -> None], Framed[$CellContext`hlines, $CellContext`histFrameRules, ImageSize -> {$CellContext`fnw, 20 $CellContext`gcHistMaxDisplayLines}]}, Center, 0], Background -> $CellContext`bkgdCol1]]; \ $CellContext`debugBytesBigDisplay = ByteCount[$CellContext`debugBigDisplay]; \ $CellContext`graphicsOut], $CellContext`calcViewpoints[ Pattern[$CellContext`viewangle, Blank[]], Pattern[$CellContext`vptmult, Blank[]]] := Module[{$CellContext`theta = Part[$CellContext`viewangle, 1], $CellContext`phi = Part[$CellContext`viewangle, 2], $CellContext`vptf}, $CellContext`vptf = { Cos[$CellContext`theta] Sin[$CellContext`phi], Sin[$CellContext`theta] Sin[$CellContext`phi], Cos[$CellContext`phi]} $CellContext`vptmult; \ {$CellContext`vptf, -$CellContext`vptf}], $CellContext`gcBoxedDisplay = False, $CellContext`gcDrawAxes = False, $CellContext`computeDisplayWidths[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`viewOpt, Blank[]], Pattern[$CellContext`showCores, Blank[]], Pattern[$CellContext`winWid, Blank[]]] := Module[{$CellContext`winw, $CellContext`ttlw, $CellContext`fnw, \ $CellContext`frs, $CellContext`frw, $CellContext`sepw, $CellContext`seph, \ $CellContext`dispw, $CellContext`disph, $CellContext`fcsz}, \ {$CellContext`dispw, $CellContext`disph} = \ $CellContext`calcWindowDims[$CellContext`nx, $CellContext`showCores, \ $CellContext`viewOpt]; $CellContext`sepw = 4; Which[ And[$CellContext`viewOpt <= 2, Not[$CellContext`showCores]], $CellContext`winw = 1.206 $CellContext`winWid; $CellContext`ttlw = ( 5 $CellContext`winw)/ 3; $CellContext`fnw = $CellContext`ttlw; $CellContext`frs = 1.; $CellContext`frw = $CellContext`frs $CellContext`winw, And[$CellContext`viewOpt <= 2, $CellContext`showCores], $CellContext`winw = 1.206 $CellContext`winWid; $CellContext`ttlw = ( 5 $CellContext`winw)/ 3; $CellContext`fnw = $CellContext`ttlw; $CellContext`frs = If[$CellContext`nx <= 6, 1., (1. $CellContext`nx)/$CellContext`disph]; \ $CellContext`frw = $CellContext`frs $CellContext`winw, And[$CellContext`viewOpt > 2, Not[$CellContext`showCores]], $CellContext`winw = 1. $CellContext`winWid; $CellContext`ttlw = $CellContext`winw; \ $CellContext`fnw = 2 $CellContext`ttlw + $CellContext`sepw; $CellContext`frs = 1.; $CellContext`frw = ($CellContext`frs $CellContext`winw \ $CellContext`nx)/$CellContext`dispw, And[$CellContext`viewOpt > 2, $CellContext`showCores], $CellContext`winw = 1. $CellContext`winWid; $CellContext`ttlw = $CellContext`winw; \ $CellContext`fnw = 2 $CellContext`ttlw + $CellContext`sepw; $CellContext`frs = If[$CellContext`nx <= 2, (1. $CellContext`dispw)/$CellContext`disph, ( 1.25 $CellContext`dispw)/$CellContext`disph]; \ $CellContext`frw = ($CellContext`frs $CellContext`winw 1. $CellContext`nx)/$CellContext`dispw]; $CellContext`seph = \ ($CellContext`frs $CellContext`winw $CellContext`disph)/$CellContext`dispw; \ $CellContext`fnw = $CellContext`fnw + 4; $CellContext`fcsz = Min[ Sqrt[$CellContext`nx/4], 1] $CellContext`frw $CellContext`gcImageRatio; \ {$CellContext`winw, $CellContext`ttlw, $CellContext`fnw, $CellContext`frs, \ $CellContext`frw, $CellContext`sepw, $CellContext`seph, $CellContext`dispw, \ $CellContext`disph, $CellContext`fcsz}], $CellContext`calcWindowDims[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`showcores, Blank[]], Pattern[$CellContext`viewopt, Blank[]]] := ($CellContext`calcWindowDims[$CellContext`nx, \ $CellContext`showcores, $CellContext`viewopt] = ( Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in calcWindowDims"]; Assert[ Or[$CellContext`showcores == True, $CellContext`showcores == False], "showcores in calcWindowDims"]; Assert[1 <= $CellContext`viewopt <= 3, "viewopt in calcWindowDims"]; Which[ Not[$CellContext`showcores], {$CellContext`nx, $CellContext`nx}, \ $CellContext`viewopt <= 2, { Max[$CellContext`nx, 2 $CellContext`nx - 2, 3 $CellContext`nx - 10], Max[$CellContext`nx, 2 $CellContext`nx - 6]}, True, { Max[$CellContext`nx, 2 $CellContext`nx - 6], Max[$CellContext`nx, 2 $CellContext`nx - 2]}])), $CellContext`gcImageRatio = 4/3, $CellContext`buildInfoPanel[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`cubestate$, Blank[]], Pattern[$CellContext`recOn$, Blank[]], Pattern[$CellContext`fnotewid$, Blank[]]] := Module[{$CellContext`showDebugInfo$ = False, $CellContext`nxCubed$ = $CellContext`nx$^3, \ $CellContext`maxaligned$, $CellContext`recStatusRow$, $CellContext`misaTtip$, \ $CellContext`seqdTtip$, $CellContext`misaFrac$, $CellContext`seqdText$, \ $CellContext`seqStatusRow$, $CellContext`seqStatusFrPane$, \ $CellContext`debugStatusRow1$, $CellContext`debugStatusRow2$, \ $CellContext`histStatusRow$, $CellContext`testlines$, \ $CellContext`infoStyle1$, $CellContext`infoStyle2$, \ $CellContext`infoStyle3$}, $CellContext`infoStyle1$ = { Lighter[Blue, 0.6], 12, FontFamily -> "Courier"}; $CellContext`infoStyle2$ = { Black, 12, FontFamily -> "Arial"}; $CellContext`infoStyle3$ = { Black, 12, Bold, FontFamily -> "Arial"}; $CellContext`maxaligned$ = Max[ Part[ Tally[ Flatten[$CellContext`cubestate$]], All, 2]]; $CellContext`recStatusRow$ = If[$CellContext`recOn$, $CellContext`recDisplayOn[$CellContext`nx$, \ $CellContext`gsRecBuffLen, $CellContext`gbRecIntBuffer, \ $CellContext`gcMoveTextFormat], $CellContext`recDisplayOff[$CellContext`gsRecBuffLen]]; \ $CellContext`misaTtip$ = "Fraction of misaligned subcubes"; $CellContext`seqdTtip$ = "Name & status of currently executing sequence"; \ $CellContext`misaFrac$ = If[$CellContext`nxCubed$ > $CellContext`maxaligned$, StringJoin[ ToString[$CellContext`nxCubed$ - $CellContext`maxaligned$], "/", ToString[$CellContext`nxCubed$]], Style["** SOLVED **", Red, Bold, 12]]; $CellContext`seqdText$ = StringJoin[$CellContext`cvSeqDesc$$, " <", If[ Or[$CellContext`cvReady$$, $CellContext`cvMovesIx$$ > \ $CellContext`cvNumMoves$$], "done", ToString[$CellContext`cvMovesIx$$]], ">"]; $CellContext`seqStatusRow$ = Row[{ Grid[{{ Row[{ Tooltip[ Style[ "misaligned: ", $CellContext`infoStyle3$], \ $CellContext`misaTtip$], Tooltip[ Style[$CellContext`misaFrac$, $CellContext`infoStyle2$], \ $CellContext`misaTtip$], Null}]}}, Alignment -> Left, ItemSize -> $CellContext`fnotewid$ 0.019], Grid[{{ Row[{ Tooltip[ Style[ "sequence: ", $CellContext`infoStyle3$], \ $CellContext`seqdTtip$], Tooltip[ Style[$CellContext`seqdText$, $CellContext`infoStyle2$], \ $CellContext`seqdTtip$], Null}]}}, Alignment -> Left, ItemSize -> $CellContext`fnotewid$ 0.04]}, Spacer[10]]; $CellContext`seqStatusFrPane$ = Framed[ Pane[$CellContext`seqStatusRow$, ImageSize -> {Automatic, 14}], FrameStyle -> None]; If[$CellContext`showDebugInfo$, $CellContext`debugStatusRow1$ = Row[{ Style[ StringJoin["cvReady = ", If[$CellContext`cvReady$$, "-True -", "-False-"]], $CellContext`infoStyle1$], Style[ StringExpression[" ET: ", StringTake[ DateString[$CellContext`debugElapsedTime], -8]], \ $CellContext`infoStyle1$]}]; $CellContext`debugStatusRow2$ = Style[ StringExpression["Memory Usage (MB): miufe = ", ToString[MemoryInUse[$FrontEnd]/2.^20], " miu = ", ToString[MemoryInUse[]/2.^20], " maxmu = ", ToString[ MaxMemoryUsed[]/ 2.^20]], $CellContext`infoStyle1$]; \ $CellContext`histStatusRow$ = Style[ StringExpression["History Info: ", ToString[$CellContext`gsHistPtr], " ", ToString[$CellContext`gsHistBufferLength], " ", ToString[$CellContext`gsHistTotalMoves], " ", ToString[$CellContext`gcHistMaxLen], " ", ToString[$CellContext`gcHistMaxDisplayWidth], " ", ToString[$CellContext`gcHistMaxDisplayLines], " ", ToString[$CellContext`gsHistStixLen], " bcbd = ", ToString[ Round[$CellContext`debugBytesBigDisplay/2.^10]], " KB", " cum = ", ToString[ Round[$CellContext`debugCumBytesBigDisplay/2.^20]], " MB", " "], $CellContext`infoStyle1$]; Null]; $CellContext`testlines$ = If[$CellContext`showDebugInfo$, Column[{$CellContext`seqStatusRow$, \ $CellContext`debugStatusRow1$, $CellContext`debugStatusRow2$, \ $CellContext`histStatusRow$, $CellContext`recStatusRow$}, Left], Column[{$CellContext`seqStatusRow$, $CellContext`recStatusRow$}, Left]]; $CellContext`testlines$], $CellContext`recDisplayOn[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`len, Blank[]], Pattern[$CellContext`buf, Blank[]], Pattern[$CellContext`fmt, Blank[]]] := Module[{$CellContext`onTtip = "Recording buffer collects moves for user-defined sequences.", \ $CellContext`txt}, $CellContext`txt = \ $CellContext`recStatusBuffSize[$CellContext`len, $CellContext`nx, \ $CellContext`buf, $CellContext`fmt]; Row[{ Tooltip[ Style[ " recording:", Black, 12, Bold, FontFamily -> "Arial"], $CellContext`onTtip], Framed[ Tooltip[ Style[ "ON", White, 12, Bold, Italic, FontFamily -> "Arial"], $CellContext`onTtip], FrameMargins -> {{2, 3}, {0, 0}}, Background -> $CellContext`gcBkgdRecOn], Tooltip[ Style[$CellContext`txt, Black, 12, FontFamily -> "Arial"], $CellContext`onTtip]}, Spacer[2]]], $CellContext`recStatusBuffSize[ Pattern[$CellContext`len, Blank[]], Optional[ Pattern[$CellContext`nx, Blank[]], 0], Optional[ Pattern[$CellContext`buf, Blank[]], {}], Optional[ Pattern[$CellContext`fmt, Blank[]], "RCN"]] := Module[{$CellContext`txt, $CellContext`lastmove, $CellContext`bfmt = "buffer empty", $CellContext`bfeq = "buffer size = "}, $CellContext`txt = If[$CellContext`nx <= 0, Which[$CellContext`len <= 0, $CellContext`bfmt, $CellContext`len == 1, StringJoin[$CellContext`bfeq, "1 move"], $CellContext`len > 1, StringJoin[$CellContext`bfeq, ToString[$CellContext`len], " moves"]], If[$CellContext`len > 0, $CellContext`lastmove = Switch[$CellContext`fmt, "FRU", $CellContext`mfInt2Text[$CellContext`nx, Part[$CellContext`buf, $CellContext`len], False], "RCN", $CellContext`mfInt2Text[$CellContext`nx, Part[$CellContext`buf, $CellContext`len], True]]]; Which[$CellContext`len <= 0, $CellContext`bfmt, $CellContext`len == 1, StringJoin[$CellContext`bfeq, "1 move (", $CellContext`lastmove, ")"], $CellContext`len > 1, StringJoin[$CellContext`bfeq, ToString[$CellContext`len], " moves (", $CellContext`lastmove, ")"]]]; $CellContext`txt], $CellContext`mfInt2Text[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveint, Blank[]], Optional[ Pattern[$CellContext`optRCN, Blank[]], True]] := $CellContext`mfMove2Text[$CellContext`nx, $CellContext`mfInt2Move[$CellContext`moveint], \ $CellContext`optRCN], $CellContext`mfInt2Move[ Pattern[$CellContext`moveint, Blank[]]] := Module[{$CellContext`digits = IntegerDigits[$CellContext`moveint], $CellContext`layerint = Quotient[$CellContext`moveint, 100], $CellContext`face, $CellContext`dir, \ $CellContext`binarydigs, $CellContext`onespos, $CellContext`layerlist}, \ $CellContext`face = Part[$CellContext`digits, -2]; $CellContext`dir = Part[$CellContext`digits, -1]; $CellContext`binarydigs = IntegerDigits[$CellContext`layerint, 2]; $CellContext`onespos = Position[ Reverse[$CellContext`binarydigs], 1]; $CellContext`layerlist = Flatten[$CellContext`onespos]; {$CellContext`face, \ $CellContext`layerlist, $CellContext`dir}], $CellContext`gcBkgdRecOn = RGBColor[1., 0.1, 0.1], $CellContext`recDisplayOff[ Pattern[$CellContext`len, Blank[]]] := Module[{$CellContext`offTtip = "Recording buffer collects moves for User-Defined Sequences.", \ $CellContext`txt = $CellContext`recStatusBuffSize[$CellContext`len]}, Row[{ Tooltip[ Style[ " recording:", Black, 12, Bold, FontFamily -> "Arial"], $CellContext`offTtip], Tooltip[ Style[ "OFF", Black, 12, Italic, Bold, FontFamily -> "Times"], $CellContext`offTtip], Tooltip[ Style[$CellContext`txt, Black, 12, FontFamily -> "Arial"], $CellContext`offTtip]}, Spacer[2]]], $CellContext`gcHistMaxDisplayLines = 4, $CellContext`debugBytesBigDisplay = 0, $CellContext`debugCumBytesBigDisplay = 0, $CellContext`buildHistoryLines[ Pattern[$CellContext`nx, Blank[]]] := Module[{$CellContext`hStyle1, $CellContext`hStyle2, \ $CellContext`ptrline, $CellContext`ptrcol, $CellContext`hlines}, \ $CellContext`hStyle1 = { Black, Bold, 16, FontFamily -> "Courier"}; $CellContext`hStyle2 = { Black, Bold, 14, FontFamily -> "Courier"}; {$CellContext`ptrline, $CellContext`ptrcol} = \ $CellContext`histPtrLineCol[$CellContext`gsHistPtr]; $CellContext`hlines = Style[ Column[ With[{$CellContext`hdl = \ $CellContext`histDisplayLines[$CellContext`nx]}, Table[ Row[ Part[$CellContext`hdl, $CellContext`i], " "], {$CellContext`i, Length[$CellContext`hdl]}]]], $CellContext`hStyle2]; \ $CellContext`hlines], $CellContext`histPtrLineCol[ Pattern[$CellContext`ptr, Blank[]]] := Module[{$CellContext`lineno, $CellContext`colno}, \ $CellContext`lineno = $CellContext`histPtrLine[$CellContext`ptr]; \ $CellContext`colno = $CellContext`histPtrCol[$CellContext`ptr, \ $CellContext`lineno]; {$CellContext`lineno, $CellContext`colno}], \ $CellContext`histPtrLine[ Pattern[$CellContext`ptr, Blank[]]] := Module[{$CellContext`ptrline, $CellContext`sl1, $CellContext`ix}, \ $CellContext`ptrline = Which[ Or[$CellContext`ptr < 0, $CellContext`ptr > $CellContext`gsHistBufferLength, \ $CellContext`gsHistStixLen <= 0], 0, $CellContext`gsHistStixLen == 1, 1, True, -1]; If[$CellContext`ptrline < 0, $CellContext`sl1 = Flatten[{0, Part[$CellContext`gbHistStixBuffer, Span[2, $CellContext`gsHistStixLen]], Infinity}]; $CellContext`ix = 1; While[Part[$CellContext`sl1, $CellContext`ix] <= \ $CellContext`ptr, Increment[$CellContext`ix]]; $CellContext`ptrline = \ $CellContext`ix - 1; Null]; $CellContext`ptrline], $CellContext`histPtrCol[ Pattern[$CellContext`ptr, Blank[]], Pattern[$CellContext`lineno, Blank[]]] := (If[$CellContext`lineno < 1, Print[ "1: histPtrCol: lineno = ", $CellContext`lineno, " ptr = ", $CellContext`ptr]]; If[$CellContext`lineno > $CellContext`gsHistStixLen, Print["2: histPtrCol: lineno = ", $CellContext`lineno]]; If[$CellContext`ptr < 0, Print[ "3: histPtrCol: lineno = ", $CellContext`lineno, " ptr = ", $CellContext`ptr]]; If[$CellContext`ptr > $CellContext`gsHistBufferLength, Print[ "4: histPtrCol: lineno = ", $CellContext`lineno, " ptr = ", $CellContext`ptr]]; Assert[ And[ 1 <= $CellContext`lineno <= $CellContext`gsHistStixLen, 0 <= $CellContext`ptr <= $CellContext`gsHistBufferLength], "lineno and ptr in histPtrCol"]; Which[ Or[$CellContext`lineno <= 0, $CellContext`lineno > $CellContext`gsHistStixLen], 0, $CellContext`ptr == 0, 1, True, $CellContext`ptr - Part[$CellContext`gbHistStixBuffer, $CellContext`lineno] + 2]), $CellContext`histDisplayLines[ Pattern[$CellContext`nx, Blank[]]] := Module[{$CellContext`ptrline, $CellContext`ptrcol, \ $CellContext`line1, $CellContext`line2, $CellContext`linex, $CellContext`ix1, \ $CellContext`ix2, $CellContext`currline, $CellContext`txtlines, \ $CellContext`nummoves1, $CellContext`nummoves2, $CellContext`tticons}, \ {$CellContext`ptrline, $CellContext`ptrcol} = \ $CellContext`histPtrLineCol[$CellContext`gsHistPtr]; {$CellContext`line1, \ $CellContext`line2} = \ $CellContext`histCalcDispLines[$CellContext`gcHistMaxDisplayLines, \ $CellContext`gsHistStixLen, $CellContext`ptrline]; $CellContext`txtlines = {}; \ $CellContext`nummoves1 = Part[$CellContext`gbHistStixBuffer, $CellContext`line1] - 1; $CellContext`nummoves2 = If[$CellContext`line2 == $CellContext`gsHistStixLen, 0, $CellContext`gsHistBufferLength - Part[$CellContext`gbHistStixBuffer, $CellContext`line2 + 1] + 1]; $CellContext`tticons = { Tooltip[ $CellContext`histGetIcon[1], StringJoin["History pointer: ", ToString[$CellContext`gsHistPtr]]], Tooltip[ $CellContext`histGetIcon[2], "Start of history"], Tooltip[ $CellContext`histGetIcon[3], StringJoin["End of history: ", ToString[$CellContext`gsHistBufferLength], " moves"]], Tooltip[ $CellContext`histGetIcon[4], StringJoin[ ToString[$CellContext`nummoves1], " moves"]], Tooltip[ $CellContext`histGetIcon[5], StringJoin[ ToString[$CellContext`nummoves2], " moves"]]}; For[$CellContext`linex = $CellContext`line1, $CellContext`linex <= \ $CellContext`line2, Increment[$CellContext`linex], $CellContext`ix1 = Part[$CellContext`gbHistStixBuffer, $CellContext`linex]; \ $CellContext`ix2 = If[$CellContext`linex < $CellContext`gsHistStixLen, Part[$CellContext`gbHistStixBuffer, $CellContext`linex + 1] - 1, $CellContext`gsHistBufferLength]; $CellContext`currline = Switch[$CellContext`gcMoveTextFormat, "FRU", Part[$CellContext`gbHistTextBufferFRU, Span[$CellContext`ix1, $CellContext`ix2]], "RCN", Part[$CellContext`gbHistTextBufferRCN, Span[$CellContext`ix1, $CellContext`ix2]]]; If[$CellContext`linex == $CellContext`ptrline, \ $CellContext`currline = Insert[$CellContext`currline, Part[$CellContext`tticons, 1], $CellContext`ptrcol]]; If[$CellContext`linex == 1, $CellContext`currline = Insert[$CellContext`currline, Part[$CellContext`tticons, 2], 1]]; If[ And[$CellContext`linex != 1, $CellContext`linex == $CellContext`line1], \ $CellContext`currline = Insert[$CellContext`currline, Part[$CellContext`tticons, 4], 1]]; If[$CellContext`linex == $CellContext`gsHistStixLen, \ $CellContext`currline = Insert[$CellContext`currline, Part[$CellContext`tticons, 3], -1]]; If[ And[$CellContext`linex != $CellContext`gsHistStixLen, \ $CellContext`linex == $CellContext`line2], $CellContext`currline = Insert[$CellContext`currline, Part[$CellContext`tticons, 5], -1]]; AppendTo[$CellContext`txtlines, $CellContext`currline]; Null]; $CellContext`txtlines], $CellContext`histCalcDispLines[ Pattern[$CellContext`maxdisplines, Blank[]], Pattern[$CellContext`numhistlines, Blank[]], Pattern[$CellContext`hptrline, Blank[]]] := Module[{$CellContext`halfWindow, $CellContext`line1, \ $CellContext`line2}, $CellContext`halfWindow = Floor[($CellContext`maxdisplines - 1)/2]; If[$CellContext`numhistlines <= $CellContext`maxdisplines, Return[{1, $CellContext`numhistlines}]]; $CellContext`line1 = Clip[$CellContext`hptrline - $CellContext`halfWindow, { 1, $CellContext`numhistlines - ($CellContext`maxdisplines - 1)}]; $CellContext`line2 = $CellContext`line1 + \ ($CellContext`maxdisplines - 1); {$CellContext`line1, $CellContext`line2}], \ $CellContext`histGetIcon[ Pattern[$CellContext`ix, Blank[]]] := ($CellContext`histGetIcon[$CellContext`ix] = Module[{$CellContext`diamond, $CellContext`octagon, \ $CellContext`iconrules, $CellContext`icon}, $CellContext`iconrules = { ImageSize -> 12, BaselinePosition -> Scaled[0.2]}; $CellContext`icon = Switch[$CellContext`ix, 1, $CellContext`diamond = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}, { 1, 0}}; Graphics[{ ColorData["Legacy"]["MidnightBlue"], Polygon[$CellContext`diamond]}, $CellContext`iconrules], 2, $CellContext`octagon = Map[{ Cos[#], Sin[#]}& , Range[1, 17, 2] (Pi/8)]; Graphics[{Red, Polygon[{$CellContext`octagon}]}, $CellContext`iconrules], 3, Graphics[{ Darker[Green, 0.3], Rectangle[]}, $CellContext`iconrules], 4, Graphics[{Orange, Polygon[{{0, 1}, {2, 2}, {2, 0}, {0, 1}}]}, $CellContext`iconrules], 5, Graphics[{Orange, Polygon[{{0, 1}, {-2, 2}, {-2, 0}, {0, 1}}]}, $CellContext`iconrules]]; $CellContext`icon]), \ $CellContext`buildCubeAndCores[ Pattern[$CellContext`corelistin, Blank[]], Pattern[$CellContext`maNx, Blank[]], Pattern[$CellContext`maCubeState, Blank[]], Pattern[$CellContext`maRotAngle, Blank[]], Pattern[$CellContext`maViewOpt, Blank[]], Pattern[$CellContext`maShowCores, Blank[]], Pattern[$CellContext`maWindowWidth, Blank[]], Pattern[$CellContext`maSubcubeSize, Blank[]], Pattern[$CellContext`maCurrAxisXYZ, Blank[]], Pattern[$CellContext`maCurrLayerListXYZ, Blank[]], Pattern[$CellContext`maShowRings, Blank[]], Pattern[$CellContext`maShowRingsTemp, Blank[]], Pattern[$CellContext`maForceRings, Blank[]], Pattern[$CellContext`maXInvis, Blank[]], Pattern[$CellContext`maYInvis, Blank[]], Pattern[$CellContext`maZInvis, Blank[]], Pattern[$CellContext`maWireFrame, Blank[]], Pattern[$CellContext`maShowMisAl3, Blank[]], Pattern[$CellContext`maRecOn, Blank[]], Pattern[$CellContext`maIxUds, Blank[]], Pattern[$CellContext`maFaceC1, Blank[]], Pattern[$CellContext`maFaceC2, Blank[]], Pattern[$CellContext`maFaceC3, Blank[]], Pattern[$CellContext`maFaceC4, Blank[]], Pattern[$CellContext`maFaceC5, Blank[]], Pattern[$CellContext`maFaceC6, Blank[]], Pattern[$CellContext`maEdgeTh, Blank[]], Pattern[$CellContext`maRingTh, Blank[]], Pattern[$CellContext`maEdgeColor, Blank[]], Pattern[$CellContext`maRingColor, Blank[]], Pattern[$CellContext`maBkgdColor, Blank[]], Pattern[$CellContext`maViewPtAngle, Blank[]], Pattern[$CellContext`maViewPtMult, Blank[]], Pattern[$CellContext`maShowFrames, Blank[]], Optional[ Pattern[$CellContext`debugInfo, Blank[]], False]] := Module[{$CellContext`numOris = 25, $CellContext`corelist = Union[ Flatten[{$CellContext`corelistin}]], \ $CellContext`grCplxSubcubes, $CellContext`grCplxRings, \ $CellContext`modCubeState, $CellContext`ixCore, $CellContext`maxcores, \ $CellContext`coreNo, $CellContext`currCore, $CellContext`currgr3d, \ $CellContext`coretable, $CellContext`ringlayers, $CellContext`drawRings, \ $CellContext`posNonRot, $CellContext`posRot, $CellContext`transNonRot, \ $CellContext`transRot, $CellContext`grCplxNonRot, $CellContext`grCplxRot, \ $CellContext`ixOri, $CellContext`rotlayerlist, $CellContext`scCoords, \ $CellContext`edgeform, $CellContext`grCplxWireFrame, $CellContext`currPolys, \ $CellContext`nxfac, $CellContext`wwfac, $CellContext`edgeAbsTh, \ $CellContext`ringAbsTh, $CellContext`ringOption}, $CellContext`rotlayerlist = \ $CellContext`mfCleanLayers[$CellContext`maNx, \ $CellContext`maCurrLayerListXYZ]; Assert[1 <= $CellContext`maNx <= $CellContext`gcMaxCubeLength, "maNx in buildCubeAndCores"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`maNx, \ $CellContext`maCurrLayerListXYZ], "maCurrLayerListXYZ in buildCubeAndCores"]; \ $CellContext`maxcores = Floor[($CellContext`maNx + 1)/2]; If[Length[$CellContext`corelist] == 0, $CellContext`corelist = Range[ 0, $CellContext`maxcores - 1]]; $CellContext`modCubeState = \ $CellContext`flagRotInvis[$CellContext`maNx, $CellContext`maCubeState, \ $CellContext`maCurrAxisXYZ, $CellContext`maCurrLayerListXYZ, \ $CellContext`maRotAngle, {$CellContext`maXInvis, $CellContext`maYInvis, \ $CellContext`maZInvis}, $CellContext`maWireFrame, $CellContext`maShowMisAl3]; \ $CellContext`nxfac = Min[ Sqrt[$CellContext`maNx/4.], 1.]/$CellContext`maNx; $CellContext`wwfac = \ $CellContext`maWindowWidth/320.; $CellContext`edgeAbsTh = Round[3. $CellContext`nxfac $CellContext`wwfac \ $CellContext`maEdgeTh, 0.0001]; $CellContext`ringAbsTh = Round[2.4 $CellContext`nxfac $CellContext`wwfac \ $CellContext`maRingTh, 0.0001]; $CellContext`edgeform = If[$CellContext`maEdgeTh <= 0, EdgeForm[], EdgeForm[{$CellContext`maEdgeColor, AbsoluteThickness[$CellContext`edgeAbsTh]}]]; \ $CellContext`currPolys = {$CellContext`edgeform, $CellContext`maFaceC1, Polygon[{5, 7, 8, 6}], $CellContext`maFaceC2, Polygon[{7, 3, 4, 8}], $CellContext`maFaceC3, Polygon[{8, 4, 2, 6}], $CellContext`maFaceC4, Polygon[{1, 3, 4, 2}], $CellContext`maFaceC5, Polygon[{1, 2, 6, 5}], $CellContext`maFaceC6, Polygon[{7, 3, 1, 5}]}; $CellContext`scCoords = $CellContext`maSubcubeSize \ $CellContext`gcUnitScVertexCoords; $CellContext`grCplxWireFrame = GraphicsComplex[ Part[$CellContext`scCoords, 1], { GrayLevel[0.6], AbsoluteThickness[0.25], Line[{{1, 5, 6, 2}, {5, 7, 8, 6}, {7, 3, 4, 8}, {3, 1, 2, 4}}]}]; $CellContext`grCplxSubcubes = Append[ Table[ GraphicsComplex[ Part[$CellContext`scCoords, $CellContext`i], \ $CellContext`currPolys], {$CellContext`i, 24}], $CellContext`grCplxWireFrame]; $CellContext`coretable = Part[ Reap[ For[$CellContext`ixCore = 1, $CellContext`ixCore <= Length[$CellContext`corelist], Increment[$CellContext`ixCore], $CellContext`coreNo = Part[$CellContext`corelist, $CellContext`ixCore]; If[ Not[0 <= $CellContext`coreNo <= $CellContext`maxcores - 1], Continue[]]; $CellContext`currCore = \ $CellContext`getCore[$CellContext`maNx, $CellContext`modCubeState, \ $CellContext`coreNo]; $CellContext`posNonRot = Table[ Position[$CellContext`currCore, $CellContext`i], \ {$CellContext`i, $CellContext`numOris}]; $CellContext`transNonRot = Table[ Extract[ $CellContext`subcubeCenters[$CellContext`maNx - 2 $CellContext`coreNo], Part[$CellContext`posNonRot, $CellContext`i]], \ {$CellContext`i, $CellContext`numOris}]; $CellContext`grCplxNonRot = If[Count[ Flatten[$CellContext`currCore], Condition[ Pattern[$CellContext`ori, Blank[]], $CellContext`ori > 0]] <= 0, {}, Part[ Reap[ For[$CellContext`ixOri = 1, $CellContext`ixOri <= $CellContext`numOris, Increment[$CellContext`ixOri], If[Length[ Part[$CellContext`posNonRot, $CellContext`ixOri]] > 0, Sow[ Translate[ Part[$CellContext`grCplxSubcubes, $CellContext`ixOri], Part[$CellContext`transNonRot, $CellContext`ixOri]]]]]], 2, 1]]; $CellContext`posRot = Table[ Position[$CellContext`currCore, -$CellContext`i], \ {$CellContext`i, $CellContext`numOris}]; $CellContext`transRot = Table[ Extract[ $CellContext`subcubeCenters[$CellContext`maNx - 2 $CellContext`coreNo], Part[$CellContext`posRot, $CellContext`i]], \ {$CellContext`i, $CellContext`numOris}]; $CellContext`grCplxRot = If[Count[ Flatten[$CellContext`currCore], Condition[ Pattern[$CellContext`ori, Blank[]], $CellContext`ori < 0]] <= 0, {}, Part[ Reap[ For[$CellContext`ixOri = 1, $CellContext`ixOri <= $CellContext`numOris, Increment[$CellContext`ixOri], If[Length[ Part[$CellContext`posRot, $CellContext`ixOri]] > 0, Sow[ Translate[ Part[$CellContext`grCplxSubcubes, $CellContext`ixOri], Part[$CellContext`transRot, $CellContext`ixOri]]]]]], 2, 1]]; $CellContext`ringOption = Or[$CellContext`maForceRings, And[$CellContext`maShowRingsTemp, \ $CellContext`maShowRings]]; $CellContext`ringlayers = Select[$CellContext`maCurrLayerListXYZ - \ $CellContext`coreNo, 1 <= # <= $CellContext`maNx - 2 $CellContext`coreNo& ]; $CellContext`drawRings = And[Length[$CellContext`ringlayers] > 0, $CellContext`maRingTh > 0, $CellContext`ringOption]; If[$CellContext`drawRings, $CellContext`grCplxRings = \ $CellContext`makeRings[$CellContext`maNx - 2 $CellContext`coreNo, $CellContext`maSubcubeSize, \ $CellContext`maCurrAxisXYZ, $CellContext`ringlayers, \ $CellContext`maRingColor, $CellContext`ringAbsTh]; Null]; $CellContext`currgr3d = {$CellContext`grCplxNonRot, Rotate[$CellContext`grCplxRot, $CellContext`maRotAngle, UnitVector[3, $CellContext`maCurrAxisXYZ]], If[$CellContext`drawRings, Rotate[$CellContext`grCplxRings, $CellContext`maRotAngle, UnitVector[3, $CellContext`maCurrAxisXYZ]], {}]}; Sow[$CellContext`currgr3d]]; Null], 2, 1]; If[$CellContext`debugInfo, $CellContext`debugBuildCubeCores = \ {$CellContext`maCurrAxisXYZ, Null, $CellContext`maCurrLayerListXYZ, \ $CellContext`grCplxWireFrame, $CellContext`edgeform, {$CellContext`maFaceC1, \ $CellContext`maFaceC2, $CellContext`maFaceC3, $CellContext`maFaceC4, \ $CellContext`maFaceC5, $CellContext`maFaceC6}, $CellContext`currPolys, \ $CellContext`grCplxSubcubes, $CellContext`coretable}, \ $CellContext`debugBuildCubeCores = {}]; $CellContext`coretable], \ $CellContext`flagRotInvis[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`cubestate, Blank[]], Pattern[$CellContext`axis, Blank[]], Pattern[$CellContext`rotlayers, Blank[]], Pattern[$CellContext`angle, Blank[]], Optional[ Pattern[$CellContext`invis, Blank[]], {{}, {}, {}}], Optional[ Pattern[$CellContext`wireframesQ, Blank[]], False], Optional[ Pattern[$CellContext`showMisAl3, Blank[]], 1]] := Module[{$CellContext`cs1 = $CellContext`cubestate, $CellContext`wf0, \ $CellContext`csTally, $CellContext`alignedOri, $CellContext`aopos}, Assert[1 <= $CellContext`axis <= 3, "axis in flagRotInvis"]; Assert[ MemberQ[{True, False}, $CellContext`wireframesQ], "wireframesQ in flagRotInvis"]; Assert[1 <= $CellContext`showMisAl3 <= 3, "showMisAl3 in flagRotInvis"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`rotlayers], "rotlayers in flagRotInvis"]; $CellContext`wf0 = If[$CellContext`wireframesQ, 25, 0]; If[$CellContext`showMisAl3 > 1, $CellContext`alignedOri = \ $CellContext`mostCommonOri[$CellContext`cs1]; If[$CellContext`alignedOri > 0, $CellContext`aopos = Switch[$CellContext`showMisAl3, 2, Position[$CellContext`cs1, Condition[ Pattern[$CellContext`x, Blank[]], $CellContext`x != $CellContext`alignedOri]], 3, Position[$CellContext`cs1, $CellContext`alignedOri]]; \ $CellContext`cs1 = ReplacePart[$CellContext`cs1, $CellContext`aopos -> \ $CellContext`wf0]; Null]]; If[Length[ Part[$CellContext`invis, 1]] > 0, Part[$CellContext`cs1, $CellContext`nx + 1 - Part[$CellContext`invis, 1], All, All] = $CellContext`wf0]; If[Length[ Part[$CellContext`invis, 2]] > 0, Part[$CellContext`cs1, All, $CellContext`nx + 1 - Part[$CellContext`invis, 2], All] = $CellContext`wf0]; If[Length[ Part[$CellContext`invis, 3]] > 0, Part[$CellContext`cs1, All, All, $CellContext`nx + 1 - Part[$CellContext`invis, 3]] = $CellContext`wf0]; If[ And[$CellContext`angle != 0, Length[$CellContext`rotlayers] > 0], Switch[$CellContext`axis, 1, TimesBy[ Part[$CellContext`cs1, $CellContext`rotlayers, All, All], -1], 2, TimesBy[ Part[$CellContext`cs1, All, $CellContext`rotlayers, All], -1], 3, TimesBy[ Part[$CellContext`cs1, All, All, $CellContext`rotlayers], -1]]]; $CellContext`cs1], \ $CellContext`mostCommonOri[ Pattern[$CellContext`cubestate, Blank[]]] := Module[{$CellContext`csTally = Tally[ Flatten[$CellContext`cubestate]]}, If[ Length[$CellContext`csTally] == 1, - Part[$CellContext`csTally, 1, 1], Part[ SortBy[$CellContext`csTally, 100 Part[#, 2] + (25 - Part[#, 1])& ], -1, 1]]], $CellContext`gcUnitScVertexCoords = CompressedData[" 1:eJytk0sKwzAMRB266RG67ZV6hB6gvf+qTaCFIGZGL5+AIcjy6Gks35/vx+sy xrjN6zqv5f8jvukXn1b7y/9/qbz1nsol2i7PabszNVZrVi3Vo+vV8ZGahJ36 1rGeydQxKl6XpzgUi+o55TnfEm83D8kH4v3WOVP9Jl26R9jJPO850zEdvTPF V2NOw9V0GmmWXc/pfSVvSO2tPXR+khl13Kl/ypH8dL5RvXQHitdpUA/IOzly V9SjM2ba9bqnhvOB+kneW/Klxr4CaH61 "], $CellContext`getCore[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`modcubestate, Blank[]], Pattern[$CellContext`coreNo, Blank[]]] := Module[{$CellContext`layerlist, $CellContext`maxcores}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in getCore"]; If[$CellContext`coreNo == 0, $CellContext`modcubestate, $CellContext`maxcores = Floor[($CellContext`nx + 1)/2]; Assert[0 <= $CellContext`coreNo <= $CellContext`maxcores - 1, "coreNo in getCore"]; $CellContext`layerlist = Range[$CellContext`coreNo + 1, $CellContext`nx - $CellContext`coreNo]; Part[$CellContext`modcubestate, $CellContext`layerlist, \ $CellContext`layerlist, $CellContext`layerlist]]], $CellContext`subcubeCenters[ Pattern[$CellContext`nx, Blank[Integer]]] := ($CellContext`subcubeCenters[$CellContext`nx] = Module[{$CellContext`cnxmax, $CellContext`cnx}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in subcubeCenters"]; $CellContext`cnxmax = 100 ($CellContext`nx - 1); $CellContext`cnx = Range[-$CellContext`cnxmax, $CellContext`cnxmax, 200]; Partition[ Partition[ Tuples[$CellContext`cnx, 3], $CellContext`nx], $CellContext`nx]]), \ $CellContext`makeRings[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`maSubcubeSize, Blank[]], Pattern[$CellContext`axis, Blank[]], Pattern[$CellContext`ringlayers, Blank[]], Optional[ Pattern[$CellContext`ringcolor, Blank[]], RGBColor[0.94, 0.88, 0.94]], Optional[ Pattern[$CellContext`ringthick, Blank[]], 5]] := Module[{$CellContext`ringspac = 30, $CellContext`s1, $CellContext`s2, $CellContext`margin, \ $CellContext`p1, $CellContext`p2, $CellContext`vertexcoords0, \ $CellContext`ix, $CellContext`offset, $CellContext`transvecs, \ $CellContext`norings = Or[Length[$CellContext`ringlayers] <= 0, $CellContext`ringthick <= 0]}, If[$CellContext`norings, Return[{}]]; Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in makeRings"]; Assert[1 <= $CellContext`axis <= 3, "axis in makeRings"]; Assert[1 <= Min[$CellContext`ringlayers] <= Max[$CellContext`ringlayers] <= $CellContext`nx, "ringlayers in makeRings"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, \ $CellContext`ringlayers], "ringlayers in makeRings"]; $CellContext`margin = 1.2 $CellContext`maSubcubeSize; $CellContext`p1 = Part[ $CellContext`subcubeCenters[$CellContext`nx], 1, 1, 1, 1] - $CellContext`margin; $CellContext`p2 = Part[ $CellContext`subcubeCenters[$CellContext`nx], $CellContext`nx, \ $CellContext`nx, $CellContext`nx, 1] + $CellContext`margin; $CellContext`vertexcoords0 = Switch[$CellContext`axis, 1, {{0, $CellContext`p1, $CellContext`p1}, { 0, $CellContext`p2, $CellContext`p1}, { 0, $CellContext`p2, $CellContext`p2}, { 0, $CellContext`p1, $CellContext`p2}}, 2, {{$CellContext`p1, 0, $CellContext`p1}, {$CellContext`p2, 0, $CellContext`p1}, {$CellContext`p2, 0, $CellContext`p2}, {$CellContext`p1, 0, $CellContext`p2}}, 3, {{$CellContext`p1, $CellContext`p1, 0}, {$CellContext`p2, $CellContext`p1, 0}, {$CellContext`p2, $CellContext`p2, 0}, {$CellContext`p1, $CellContext`p2, 0}}]; $CellContext`transvecs = Reap[Do[$CellContext`offset = Part[ $CellContext`subcubeCenters[$CellContext`nx], Part[$CellContext`ringlayers, $CellContext`ix], 1, 1, 1]; Sow[UnitVector[ 3, $CellContext`axis] ($CellContext`offset - \ $CellContext`ringspac)]; Sow[UnitVector[ 3, $CellContext`axis] ($CellContext`offset + \ $CellContext`ringspac)], {$CellContext`ix, Length[$CellContext`ringlayers]}]; Null]; Translate[{ Directive[$CellContext`ringcolor, AbsoluteThickness[$CellContext`ringthick]], GraphicsComplex[$CellContext`vertexcoords0, Line[{1, 2, 3, 4, 1}]]}, Part[$CellContext`transvecs, 2, 1]]], $CellContext`debugBuildCubeCores = {}, \ $CellContext`getFaceLabels[ Pattern[$CellContext`fb, Blank[]], Pattern[$CellContext`vopt, Blank[]]] := ($CellContext`getFaceLabels[$CellContext`fb, \ $CellContext`vopt] = Module[{$CellContext`fontsize, $CellContext`labelstyle}, \ $CellContext`fontsize = If[$CellContext`vopt == 3, 18, 24]; $CellContext`labelstyle = { Lighter[Blue, 0.2], Italic, FontFamily -> "Times", $CellContext`fontsize, Bold}; Which[$CellContext`fb == 1, { Text[ Style["Front", $CellContext`labelstyle], {0.3, 0.2}], Text[ Style["Right", $CellContext`labelstyle], {0.7, 0.2}], Text[ Style["Up", $CellContext`labelstyle], {0.3, 0.8}]}, True, { Text[ Style["Back", $CellContext`labelstyle], {0.3, 0.8}], Text[ Style["Left", $CellContext`labelstyle], {0.7, 0.8}], Text[ Style["Down", $CellContext`labelstyle], {0.7, 0.2}]}]]), $CellContext`dispCubes[ Pattern[$CellContext`cubx, Blank[]], Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`frrules, Blank[]], Pattern[$CellContext`frwidth, Blank[]], Pattern[$CellContext`showcores, Blank[]], Pattern[$CellContext`showframes, Blank[]], Optional[ Pattern[$CellContext`numViews, Blank[]], 2]] := Module[{$CellContext`frstyle}, $CellContext`frstyle = If[$CellContext`showframes, Automatic, None]; Which[ Not[$CellContext`showcores], $CellContext`dispCubeNoCores[$CellContext`cubx, \ $CellContext`frrules, $CellContext`frwidth, $CellContext`frstyle], \ $CellContext`numViews == 1, $CellContext`dispCubeCores1[$CellContext`cubx, $CellContext`nx, \ $CellContext`frrules, $CellContext`frwidth, $CellContext`frstyle], True, $CellContext`dispCubeCores2[$CellContext`cubx, $CellContext`nx, \ $CellContext`frrules, $CellContext`frwidth, $CellContext`frstyle]]], \ $CellContext`dispCubeNoCores[ Pattern[$CellContext`cubx, Blank[]], Pattern[$CellContext`frrules, Blank[]], Pattern[$CellContext`frwidth, Blank[]], Pattern[$CellContext`frstyle, Blank[]]] := Framed[ Part[$CellContext`cubx, 1], $CellContext`frrules, ImageSize -> {$CellContext`frwidth, $CellContext`frwidth}, FrameMargins -> 0, FrameStyle -> $CellContext`frstyle], $CellContext`dispCubeCores1[ Pattern[$CellContext`cubx, Blank[]], Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`frrules, Blank[]], Pattern[$CellContext`frwidth, Blank[]], Pattern[$CellContext`frstyle, Blank[]]] := Module[{$CellContext`frimgsize, $CellContext`frfunc1, \ $CellContext`frdisp}, $CellContext`frimgsize = \ ($CellContext`frwidth/$CellContext`nx) Table[$CellContext`nx - $CellContext`i, {$CellContext`i, 0, $CellContext`gcMaxCubeLength, 2}]; $CellContext`frfunc1[ Pattern[$CellContext`i, Blank[]]] := Framed[ Part[$CellContext`cubx, $CellContext`i], $CellContext`frrules, ImageSize -> { Part[$CellContext`frimgsize, $CellContext`i], Part[$CellContext`frimgsize, $CellContext`i]}, FrameMargins -> 0, FrameStyle -> $CellContext`frstyle]; $CellContext`frdisp = Which[ Or[$CellContext`nx == 1, $CellContext`nx == 2], $CellContext`frfunc1[1], Or[$CellContext`nx == 3, $CellContext`nx == 4], Row[{ $CellContext`frfunc1[2], $CellContext`frfunc1[1]}], Or[$CellContext`nx == 5, $CellContext`nx == 6], Row[{ Column[{ $CellContext`frfunc1[3], $CellContext`frfunc1[2]}, Center, 0], $CellContext`frfunc1[1]}], Or[$CellContext`nx == 7, $CellContext`nx == 8], Row[{ Column[{ Row[{ $CellContext`frfunc1[4], $CellContext`frfunc1[3]}], $CellContext`frfunc1[2]}, Center, 0], $CellContext`frfunc1[1]}], Or[$CellContext`nx == 9, $CellContext`nx == 10], Row[{ Column[{ Row[{ Column[{ $CellContext`frfunc1[5], $CellContext`frfunc1[4]}, Center, 0], $CellContext`frfunc1[3]}], $CellContext`frfunc1[2]}, Center, 0], $CellContext`frfunc1[ 1]}]]; $CellContext`frdisp], $CellContext`dispCubeCores2[ Pattern[$CellContext`cubx, Blank[]], Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`frrules, Blank[]], Pattern[$CellContext`frwidth, Blank[]], Pattern[$CellContext`frstyle, Blank[]]] := Module[{$CellContext`frimgsize, $CellContext`frfunct2, \ $CellContext`frblank}, $CellContext`frimgsize = \ ($CellContext`frwidth/$CellContext`nx) Table[$CellContext`nx - $CellContext`i, {$CellContext`i, 0, $CellContext`gcMaxCubeLength, 2}]; $CellContext`frfunct2[ Pattern[$CellContext`i, Blank[]]] := Framed[ Part[$CellContext`cubx, $CellContext`i], $CellContext`frrules, ImageSize -> { Part[$CellContext`frimgsize, $CellContext`i], Part[$CellContext`frimgsize, $CellContext`i]}, FrameMargins -> 0, FrameStyle -> $CellContext`frstyle]; $CellContext`frblank[ Pattern[$CellContext`i, Blank[]], Pattern[$CellContext`j, Blank[]]] := Framed["", $CellContext`frrules, ImageSize -> { Part[$CellContext`frimgsize, $CellContext`i], Part[$CellContext`frimgsize, $CellContext`j]}, FrameMargins -> 0, FrameStyle -> $CellContext`frstyle]; Which[ Or[$CellContext`nx == 1, $CellContext`nx == 2], $CellContext`frfunct2[1], Or[$CellContext`nx == 3, $CellContext`nx == 4], Column[{ $CellContext`frfunct2[1], $CellContext`frfunct2[2]}, Center, 0], Or[$CellContext`nx == 5, $CellContext`nx == 6], Column[{ $CellContext`frfunct2[1], Row[{ $CellContext`frfunct2[3], $CellContext`frfunct2[2]}]}, Center, 0], Or[$CellContext`nx == 7, $CellContext`nx == 8], Column[{ $CellContext`frfunct2[1], Row[{ Column[{ $CellContext`frfunct2[4], $CellContext`frfunct2[3]}, Center, 0], $CellContext`frfunct2[2]}]}, Center, 0], Or[$CellContext`nx == 9, $CellContext`nx == 10], Column[{ Row[{ Column[{ $CellContext`frblank[5, $CellContext`nx - 5], $CellContext`frfunct2[5], $CellContext`frblank[5, 5], $CellContext`frfunct2[4]}, Center, 0], $CellContext`frfunct2[1]}], Row[{ $CellContext`frfunct2[3], $CellContext`frfunct2[2]}]}, Center, 0]]], $CellContext`debugBigDisplay = {}, $CellContext`doSeqNamed[ Pattern[$CellContext`name$, Blank[]], Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`selface$, Blank[]], Pattern[$CellContext`sellayers$, Blank[]], Optional[ Pattern[$CellContext`rev$, Blank[]], False]] := Module[{$CellContext`moves$, $CellContext`layers$, $CellContext`m1$, \ $CellContext`pos$, $CellContext`sname$}, $CellContext`layers$ = \ $CellContext`mfCleanLayers[$CellContext`nx$, $CellContext`sellayers$]; \ $CellContext`moves$ = $CellContext`namedMoveSeq[$CellContext`name$, \ $CellContext`nx$, $CellContext`selface$, $CellContext`layers$]; \ $CellContext`cvSeqDesc$$ = If[ StringStartsQ[$CellContext`name$, "Scramble"], $CellContext`pos$ = Part[ StringPosition[$CellContext`name$, " "], 1, 1]; $CellContext`sname$ = StringTake[$CellContext`name$, $CellContext`pos$ - 1]; StringJoin[$CellContext`sname$, " (", ToString[ Length[$CellContext`moves$]], ")"], StringJoin[$CellContext`name$, If[$CellContext`rev$, " ", ""], " (", ToString[ Length[$CellContext`moves$]], ")"]]; $CellContext`setMoveSeq[$CellContext`moves$, \ $CellContext`rev$]; $CellContext`cvShowRingsTemp$$ = False; Null], $CellContext`namedMoveSeq[ Pattern[$CellContext`seqname, Blank[]], Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`selface, Blank[]], Pattern[$CellContext`sellayers, Blank[]]] := Module[{$CellContext`movesFRU = {}, $CellContext`layers = \ $CellContext`mfCleanLayers[$CellContext`nx, $CellContext`sellayers]}, \ $CellContext`movesFRU = Switch[$CellContext`seqname, "Flip2AdjacentCorners", $CellContext`seqFlip2AdjacentCorners[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Flip2FaceDiagCorners", $CellContext`seqFlip2FaceDiagCorners[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Flip2CubeDiagCorners", $CellContext`seqFlip2CubeDiagCorners[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3Corners", $CellContext`seqSwap3Corners[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3Edges8Moves", $CellContext`seqSwap3Edges8Moves[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3EdgesSameFaceNoFlip", $CellContext`seqSwap3EdgesSameFaceNoFlip[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3EdgesSameFaceFlip2", $CellContext`seqSwap3EdgesSameFaceFlip2[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3EdgesSameCorner", $CellContext`seqSwap3EdgesSameCorner[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap3EdgesSameCornerAlt", $CellContext`seqSwap3EdgesSameCornerAlt[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Flip2EdgesInPlace", $CellContext`seqFlip2EdgesInPlace[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Flip4EdgesInPlace", $CellContext`seqFlip4EdgesInPlace[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "FlipAllEdgesInPlace", $CellContext`seqFlipAllEdgesInPlace[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap2Edges", $CellContext`seqSwap2Edges[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Swap4Edges", $CellContext`seqSwap4Edges[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Dots", $CellContext`seqDots[$CellContext`nx, $CellContext`selface, \ $CellContext`layers, 1], "Checkers", $CellContext`seqCheckers[$CellContext`nx, $CellContext`selface, \ $CellContext`layers], "Ripple", $CellContext`seqRipple[$CellContext`nx, $CellContext`selface], "MultiRipple", $CellContext`seqMultiRipple[$CellContext`nx], "RotateMidFaces180Deg", $CellContext`seqRotateMidFaces180Deg[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "RotateCore180Deg", $CellContext`seqRotateCore180Deg[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Flip2BigCorners", $CellContext`seqFlip2BigCorners[$CellContext`nx, \ $CellContext`selface, $CellContext`layers], "Scramble 10", $CellContext`randomMoves[$CellContext`nx, 10], "Scramble 20", $CellContext`randomMoves[$CellContext`nx, 20], "Scramble 100", $CellContext`randomMoves[$CellContext`nx, 100], "Scramble/Solve 10", $CellContext`randomDemo[$CellContext`nx, 5], "Scramble/Solve 20", $CellContext`randomDemo[$CellContext`nx, 10], "Scramble/Solve 100", $CellContext`randomDemo[$CellContext`nx, 50], "View Options", $CellContext`demoViewOptions[$CellContext`nx], "Subcube Sizes", $CellContext`demoSubcubeSizes[$CellContext`nx], "Face Colors", $CellContext`demoFaceColors[$CellContext`nx], "Edges Colors/Styles", $CellContext`demoEdgeColors[$CellContext`nx], "Rings Colors/Styles", $CellContext`demoRingColors[$CellContext`nx], "Background Colors", $CellContext`demoBkgdColors[$CellContext`nx], "Invisible Layers", $CellContext`demoInvis[$CellContext`nx], "Show Misaligned", $CellContext`demoShowMisAl[$CellContext`nx], "Perspective", $CellContext`demoPerspective[$CellContext`nx], "Animation Steps", $CellContext`demoNumSteps[$CellContext`nx], "All Demos", $CellContext`demoAll[$CellContext`nx], "Demo 10K", $CellContext`randomDemo[$CellContext`nx, 5000], "Demo 40K", $CellContext`randomDemo[$CellContext`nx, 20000], Blank[], {}]; $CellContext`movesFRU], \ $CellContext`seqFlip2AdjacentCorners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := $CellContext`ssqFlip2Corners[$CellContext`nx, \ $CellContext`face, $CellContext`layers, 1], $CellContext`ssqFlip2Corners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]], Pattern[$CellContext`variant, Blank[]]] := Module[{$CellContext`co, $CellContext`out3, $CellContext`s1, \ $CellContext`f1, $CellContext`f2, $CellContext`f3, $CellContext`f4, \ $CellContext`m1, $CellContext`m2, $CellContext`m3, $CellContext`m4, \ $CellContext`m5}, If[$CellContext`nx <= 1, Return[{}]]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in ssqFlip2Corners"]; {$CellContext`f1, $CellContext`f2, \ $CellContext`f3, $CellContext`f4} = $CellContext`facePerm[{5, 9, 6, 8}, $CellContext`face]; $CellContext`out3 = Part[ $CellContext`countOuterLayers[$CellContext`nx, \ $CellContext`layers], 3]; $CellContext`s1 = Which[$CellContext`out3 <= 0, {1}, True, Range[ Min[$CellContext`out3, Floor[$CellContext`nx/ 2]]]]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCCW}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCW}, \ {$CellContext`f1, $CellContext`s1, $CellContext`gcCW}}; $CellContext`m2 = \ {{$CellContext`f2, $CellContext`s1, $CellContext`gcCCW}}; $CellContext`m3 = Join[$CellContext`m1, $CellContext`m2, $CellContext`m1]; \ $CellContext`m4 = {{$CellContext`f3, $CellContext`s1, $CellContext`gcCCW}}; \ $CellContext`m5 = Join[$CellContext`m3, $CellContext`m4, $CellContext`revSeq[$CellContext`m3], $CellContext`revSeq[$CellContext`m4]]; Switch[$CellContext`variant, 1, $CellContext`m5, 2, Join[{{$CellContext`f4, $CellContext`s1, $CellContext`gcCCW}}, \ $CellContext`m5, {{$CellContext`f4, $CellContext`s1, $CellContext`gcCW}}], 3, Join[{{$CellContext`f4, $CellContext`s1, $CellContext`gcCCW2}}, \ $CellContext`m5, {{$CellContext`f4, $CellContext`s1, $CellContext`gcCW2}}]]], Attributes[$CellContext`facePerm] = {Listable}, $CellContext`facePerm[ Condition[ Pattern[$CellContext`permnum, Blank[Integer]], 4 <= $CellContext`permnum <= 9], Condition[ Pattern[$CellContext`face, Blank[Integer]], 4 <= $CellContext`face <= 9]] := Module[{$CellContext`fm3 = $CellContext`face - 3}, Switch[$CellContext`permnum, 4, Part[{4, 5, 6, 7, 8, 9}, $CellContext`fm3], 5, Part[{5, 6, 4, 9, 7, 8}, $CellContext`fm3], 6, Part[{6, 4, 5, 8, 9, 7}, $CellContext`fm3], 7, Part[{7, 8, 9, 4, 5, 6}, $CellContext`fm3], 8, Part[{8, 9, 7, 6, 4, 5}, $CellContext`fm3], 9, Part[{9, 7, 8, 5, 6, 4}, $CellContext`fm3]]], $CellContext`countOuterLayers[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`len = Length[$CellContext`layers], $CellContext`rng, $CellContext`lay2, \ $CellContext`ct1, $CellContext`ct2}, Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in countOuterLayers"]; $CellContext`rng = Range[$CellContext`len]; $CellContext`ct1 = Length[ Select[$CellContext`layers - $CellContext`rng, # == 0& ]]; $CellContext`lay2 = Union[$CellContext`nx + 1 - $CellContext`layers]; $CellContext`ct2 = Length[ Select[$CellContext`lay2 - $CellContext`rng, # == 0& ]]; {$CellContext`ct1, $CellContext`ct2, Max[$CellContext`ct1, $CellContext`ct2]}], $CellContext`gcCCW = 2, $CellContext`gcCW = 4, $CellContext`revSeq[ Pattern[$CellContext`moves, Blank[]]] := Module[{$CellContext`revmoves = Reverse[$CellContext`moves]}, Part[$CellContext`revmoves, All, 3] = Map[$CellContext`mfOppositeDir, Part[$CellContext`revmoves, All, 3]]; $CellContext`revmoves], $CellContext`gcCCW2 = 3, $CellContext`gcCW2 = 5, $CellContext`seqFlip2FaceDiagCorners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := $CellContext`ssqFlip2Corners[$CellContext`nx, \ $CellContext`face, $CellContext`layers, 2], $CellContext`seqFlip2CubeDiagCorners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := $CellContext`ssqFlip2Corners[$CellContext`nx, \ $CellContext`face, $CellContext`layers, 3], $CellContext`seqSwap3Corners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`out3, $CellContext`f1, \ $CellContext`f2, $CellContext`f3, $CellContext`m1, $CellContext`m2}, If[$CellContext`nx <= 1, Return[{}]]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in seqSwap3Corners"]; {$CellContext`f1, $CellContext`f2, \ $CellContext`f3} = $CellContext`facePerm[{5, 9, 8}, $CellContext`face]; $CellContext`out3 = Part[ $CellContext`countOuterLayers[$CellContext`nx, \ $CellContext`layers], 3]; $CellContext`s1 = Which[$CellContext`out3 <= 0, {1}, True, Range[ Min[$CellContext`out3, Floor[$CellContext`nx/ 2]]]]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCCW}}; $CellContext`m2 = {{$CellContext`f2, $CellContext`s1, \ $CellContext`gcCCW}, {$CellContext`f3, $CellContext`s1, $CellContext`gcCW}, \ {$CellContext`f2, $CellContext`s1, $CellContext`gcCW}}; Join[$CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]], \ $CellContext`seqSwap3Edges8Moves[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := $CellContext`ssqSwap3EdgesBasic[$CellContext`nx, \ $CellContext`face, $CellContext`layers, 2], $CellContext`ssqSwap3EdgesBasic[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]], Optional[ Pattern[$CellContext`variant, Blank[]], 2]] := Module[{$CellContext`s1, $CellContext`s2, $CellContext`f1, \ $CellContext`f2, $CellContext`m1, $CellContext`m2, $CellContext`m3, \ $CellContext`m4}, If[$CellContext`nx <= 2, Return[{}]]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in ssqSwap3EdgesBasic"]; {$CellContext`f1, \ $CellContext`f2} = $CellContext`facePerm[{4, 6}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s2, \ $CellContext`gcCCW}}; $CellContext`m2 = {{$CellContext`f2, $CellContext`s1, \ $CellContext`gcCW2}}; $CellContext`m3 = Join[$CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]; $CellContext`m4 = \ $CellContext`revSeq[$CellContext`m3]; Switch[$CellContext`variant, 1, $CellContext`m3, 2, Join[$CellContext`m4, $CellContext`m4], 3, Join[$CellContext`m3, $CellContext`m3, $CellContext`m3], Blank[], Join[$CellContext`m4, $CellContext`m4]]], \ $CellContext`unpackLayers[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layers, Blank[]], Optional[ Pattern[$CellContext`symmet, Blank[]], True], Optional[ Pattern[$CellContext`maxouter, Blank[]], Infinity]] := Module[{$CellContext`out1, $CellContext`out2, $CellContext`out3, \ $CellContext`numout, $CellContext`s1, $CellContext`s2}, Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in unpackLayers"]; If[$CellContext`nx <= 3, Return[ Part[{{{1}, {1}}, {{1}, {2}}, {{1}, {2}}}, $CellContext`nx]]]; If[Length[$CellContext`layers] <= 0, Return[{{1}, Range[ 2, $CellContext`nx - 1]}]]; {$CellContext`out1, $CellContext`out2, \ $CellContext`out3} = $CellContext`countOuterLayers[$CellContext`nx, \ $CellContext`layers]; $CellContext`numout = Min[$CellContext`out3, Floor[($CellContext`nx - 1)/ 2], $CellContext`maxouter]; $CellContext`numout = Max[$CellContext`numout, 1]; {$CellContext`s1, $CellContext`s2} = { Range[$CellContext`numout], $CellContext`getLayerPart[$CellContext`layers, \ $CellContext`numout + 1, $CellContext`nx - $CellContext`numout]}; If[$CellContext`symmet, $CellContext`s2 = Union[ Join[$CellContext`s2, $CellContext`nx + 1 - $CellContext`s2]]]; {$CellContext`s1, $CellContext`s2}], \ $CellContext`getLayerPart[ Pattern[$CellContext`layers, Blank[]], Pattern[$CellContext`ix1, Blank[]], Pattern[$CellContext`ix2, Blank[]]] := Module[{$CellContext`newlayers}, $CellContext`newlayers = Select[$CellContext`layers, $CellContext`ix1 <= # <= \ $CellContext`ix2& ]; If[Length[$CellContext`newlayers] == 0, Range[$CellContext`ix1, $CellContext`ix2], \ $CellContext`newlayers]], $CellContext`seqSwap3EdgesSameFaceNoFlip[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`f1, $CellContext`f2, $CellContext`f3, \ $CellContext`f4, $CellContext`s1, $CellContext`s2, $CellContext`m1, \ $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3, \ $CellContext`f4} = $CellContext`facePerm[{9, 7, 4, 6}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCW2}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCW}}; \ $CellContext`m2 = {{$CellContext`f3, $CellContext`s1, $CellContext`gcCW2}, \ {$CellContext`f4, $CellContext`s2, $CellContext`gcCW}, {$CellContext`f3, \ $CellContext`s1, $CellContext`gcCCW2}, {$CellContext`f4, $CellContext`s2, \ $CellContext`gcCCW}}; Join[$CellContext`m1, $CellContext`m2, $CellContext`m2, $CellContext`revSeq[$CellContext`m1]]], \ $CellContext`seqSwap3EdgesSameFaceFlip2[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]], Optional[ Pattern[$CellContext`symmet, Blank[]], False]] := Module[{$CellContext`s1, $CellContext`s2, $CellContext`f1, \ $CellContext`f2, $CellContext`f3, $CellContext`m1, $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3} = \ $CellContext`facePerm[{8, 9, 6}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, \ $CellContext`symmet]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCW}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCCW}, \ {$CellContext`f1, $CellContext`s1, $CellContext`gcCCW}}; $CellContext`m2 = \ {{$CellContext`f3, $CellContext`s2, $CellContext`gcCW}}; Join[$CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]], \ $CellContext`seqSwap3EdgesSameCorner[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`s2, $CellContext`f1, \ $CellContext`f2, $CellContext`f3, $CellContext`f4, $CellContext`m1, \ $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3, \ $CellContext`f4} = $CellContext`facePerm[{8, 7, 9, 5}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCCW}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCCW}, \ {$CellContext`f1, $CellContext`s1, $CellContext`gcCW2}, {$CellContext`f3, \ $CellContext`s1, $CellContext`gcCW}, {$CellContext`f2, $CellContext`s1, \ $CellContext`gcCW2}}; $CellContext`m2 = {{$CellContext`f4, $CellContext`s2, \ $CellContext`gcCCW}, {$CellContext`f3, $CellContext`s1, $CellContext`gcCCW2}, \ {$CellContext`f4, $CellContext`s2, $CellContext`gcCW}, {$CellContext`f3, \ $CellContext`s1, $CellContext`gcCW2}}; Join[$CellContext`m1, $CellContext`m2, $CellContext`m2, $CellContext`revSeq[$CellContext`m1]]], \ $CellContext`seqSwap3EdgesSameCornerAlt[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`s2, $CellContext`f1, \ $CellContext`f2, $CellContext`f3, $CellContext`f4, $CellContext`m1, \ $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3, \ $CellContext`f4} = $CellContext`facePerm[{5, 7, 9, 5}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCW}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCW}, \ {$CellContext`f1, $CellContext`s1, $CellContext`gcCCW2}, {$CellContext`f3, \ $CellContext`s1, $CellContext`gcCCW}, {$CellContext`f2, $CellContext`s1, \ $CellContext`gcCW2}}; $CellContext`m2 = {{$CellContext`f4, $CellContext`s2, \ $CellContext`gcCCW}, {$CellContext`f3, $CellContext`s1, $CellContext`gcCCW2}, \ {$CellContext`f4, $CellContext`s2, $CellContext`gcCW}, {$CellContext`f3, \ $CellContext`s1, $CellContext`gcCW2}}; $CellContext`revSeq[ Join[$CellContext`m1, $CellContext`m2, $CellContext`m2, $CellContext`revSeq[$CellContext`m1]]]], \ $CellContext`seqFlip2EdgesInPlace[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`m1, $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; $CellContext`m1 = \ $CellContext`seqSwap3EdgesSameFaceFlip2[$CellContext`nx, $CellContext`face, \ $CellContext`layers, True]; $CellContext`m2 = \ $CellContext`seqSwap3EdgesSameFaceNoFlip[$CellContext`nx, $CellContext`face, \ $CellContext`layers]; Join[$CellContext`m1, $CellContext`m1, $CellContext`m2]], \ $CellContext`seqFlip4EdgesInPlace[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`f1, $CellContext`m1, $CellContext`m2}, If[$CellContext`nx <= 2, Return[{}]]; $CellContext`f1 = $CellContext`facePerm[ 6, $CellContext`face]; $CellContext`m1 = \ $CellContext`seqFlip2EdgesInPlace[$CellContext`nx, $CellContext`face, \ $CellContext`layers]; $CellContext`m2 = \ $CellContext`seqWholeCube[$CellContext`nx, $CellContext`f1, \ $CellContext`gcCW2]; Join[$CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]], $CellContext`seqWholeCube[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`angleix, Blank[]]] := {{$CellContext`face, Range[$CellContext`nx], $CellContext`angleix}}, \ $CellContext`seqFlipAllEdgesInPlace[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`f1, $CellContext`f2, $CellContext`f3}, \ {$CellContext`f1, $CellContext`f2, $CellContext`f3} = $CellContext`facePerm[{ 4, 5, 6}, $CellContext`face]; Join[ $CellContext`seqFlip4EdgesInPlace[$CellContext`nx, \ $CellContext`f1, $CellContext`layers], $CellContext`seqFlip4EdgesInPlace[$CellContext`nx, \ $CellContext`f2, $CellContext`layers], $CellContext`seqFlip4EdgesInPlace[$CellContext`nx, \ $CellContext`f3, $CellContext`layers]]], $CellContext`seqSwap2Edges[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`f1, $CellContext`f2, $CellContext`s1, \ $CellContext`s2, $CellContext`s2a, $CellContext`s2b, $CellContext`maxlens1 = Floor[($CellContext`nx - 2)/2], $CellContext`mid = Floor[5], $CellContext`m1, $CellContext`m2, $CellContext`m3, \ $CellContext`m4, $CellContext`m5}, If[$CellContext`nx <= 3, Return[{}]]; {$CellContext`f1, $CellContext`f2} = \ $CellContext`facePerm[{6, 4}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayersEvenEdges[$CellContext`nx, $CellContext`layers]; \ $CellContext`m1 = {{$CellContext`f1, $CellContext`s2, $CellContext`gcCCW}}; \ $CellContext`m2 = {{$CellContext`f2, $CellContext`s1, $CellContext`gcCW2}}; \ $CellContext`m3 = Join[$CellContext`m2, {{$CellContext`f1, $CellContext`s2, \ $CellContext`gcCW}}]; $CellContext`m4 = Join[$CellContext`m3, $CellContext`m3, $CellContext`m3, \ $CellContext`m2]; $CellContext`m5 = {{$CellContext`f1, $CellContext`s2, \ $CellContext`gcCW2}}; Join[$CellContext`m1, $CellContext`m4, $CellContext`m5, \ $CellContext`m4, $CellContext`m1]], $CellContext`unpackLayersEvenEdges[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`s2, $CellContext`ix2a, \ $CellContext`ix2b, $CellContext`s2c, $CellContext`len1max = Floor[($CellContext`nx - 2)/2], Null}, Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layers], "layers in unpackLayersEvenEdges"]; {$CellContext`s1, \ $CellContext`s2} = $CellContext`unpackLayers[$CellContext`nx, \ $CellContext`layers, True]; If[Length[$CellContext`s1] > $CellContext`len1max, $CellContext`s1 = Range[$CellContext`len1max]]; $CellContext`ix2a = Length[$CellContext`s1] + 1; $CellContext`ix2b = Floor[$CellContext`nx/2]; $CellContext`s2c = Select[$CellContext`layers, $CellContext`ix2a <= # <= \ $CellContext`nx + 1 - $CellContext`ix2a& ]; $CellContext`s2c = Union[ Join[$CellContext`s2c, $CellContext`nx + 1 - $CellContext`s2c]]; $CellContext`s2 = Select[$CellContext`s2c, $CellContext`ix2a <= # <= \ $CellContext`ix2b& ]; If[Length[$CellContext`s2] <= 0, $CellContext`s2 = Range[$CellContext`ix2a, $CellContext`ix2b]]; {$CellContext`s1, \ $CellContext`s2}], $CellContext`seqSwap4Edges[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`f1, $CellContext`f2, $CellContext`f3, \ $CellContext`f4, $CellContext`s1, $CellContext`s2, $CellContext`m1, \ $CellContext`m2, $CellContext`m3, $CellContext`m4, $CellContext`m5, \ $CellContext`m6}, If[$CellContext`nx <= 3, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3} = \ $CellContext`facePerm[{9, 6, 4}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayersEvenEdges[$CellContext`nx, $CellContext`layers]; \ $CellContext`s2 = Select[$CellContext`s2, Length[$CellContext`s1] + 1 <= # <= Floor[$CellContext`nx/ 2]& ]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s2, \ $CellContext`gcCW2}}; $CellContext`m2 = {{$CellContext`f2, $CellContext`s2, \ $CellContext`gcCW}, {$CellContext`f3, $CellContext`s1, $CellContext`gcCW2}}; \ $CellContext`m3 = {{$CellContext`f2, $CellContext`s2, $CellContext`gcCW}}; \ $CellContext`m4 = Join[$CellContext`m2, $CellContext`m2, $CellContext`m2, \ $CellContext`m2, $CellContext`m3]; $CellContext`m5 = Join[$CellContext`m1, $CellContext`m4, $CellContext`m4, $CellContext`revSeq[$CellContext`m1]]; $CellContext`m6 = \ $CellContext`seqWholeCube[$CellContext`nx, $CellContext`f2, \ $CellContext`gcCW2]; Join[$CellContext`m5, $CellContext`m6, $CellContext`m5, $CellContext`revSeq[$CellContext`m6]]], $CellContext`seqDots[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]], Optional[ Pattern[$CellContext`variant, Blank[]], 1]] := Module[{$CellContext`f1, $CellContext`f2, $CellContext`s1, \ $CellContext`s2, $CellContext`m1, $CellContext`m2, $CellContext`m3}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2} = \ $CellContext`facePerm[{4, 6}, $CellContext`face]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`m1 = {{$CellContext`f1, $CellContext`s2, \ $CellContext`gcCW}}; $CellContext`m2 = {{$CellContext`f2, $CellContext`s2, \ $CellContext`gcCCW}}; $CellContext`m3 = Join[$CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]; Switch[$CellContext`variant, 1, $CellContext`m3, 2, Join[ $CellContext`revSeq[$CellContext`m3], $CellContext`revSeq[$CellContext`m3]], Blank[], $CellContext`m3]], $CellContext`seqCheckers[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`f1, $CellContext`f2, \ $CellContext`f3}, If[$CellContext`nx <= 2, Return[{}]]; {$CellContext`f1, $CellContext`f2, $CellContext`f3} = \ $CellContext`facePerm[{4, 5, 6}, $CellContext`face]; $CellContext`s1 = If[ OddQ[$CellContext`nx], Range[2, $CellContext`nx - 1, 2], Table[{$CellContext`i, $CellContext`nx + 1 - $CellContext`i}, {$CellContext`i, 2, $CellContext`nx/2, 2}]]; $CellContext`s1 = Sort[ Flatten[$CellContext`s1]]; {{$CellContext`f1, $CellContext`s1, \ $CellContext`gcCW2}, {$CellContext`f2, $CellContext`s1, $CellContext`gcCW2}, \ {$CellContext`f3, $CellContext`s1, $CellContext`gcCW2}}], \ $CellContext`seqRipple[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Optional[ Pattern[$CellContext`dir, Blank[]], 4]] := Map[{$CellContext`face, {#}, $CellContext`dir}& , Range[$CellContext`nx]], $CellContext`seqMultiRipple[ Pattern[$CellContext`nx, Blank[]]] := Flatten[ Map[$CellContext`seqRipple[$CellContext`nx, #]& , Range[4, 9]], 1], $CellContext`seqRotateMidFaces180Deg[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := $CellContext`ssqSwap3EdgesBasic[$CellContext`nx, \ $CellContext`face, $CellContext`layers, 3], $CellContext`seqRotateCore180Deg[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`m1, $CellContext`m2, $CellContext`f1, \ $CellContext`f2}, If[$CellContext`nx <= 3, Return[{}]]; {$CellContext`f1, $CellContext`f2} = \ $CellContext`facePerm[{6, 5}, $CellContext`face]; $CellContext`m1 = \ $CellContext`ssqCoreFlip[$CellContext`nx, $CellContext`f1, \ $CellContext`layers]; $CellContext`m2 = \ $CellContext`seqWholeCube[$CellContext`nx, $CellContext`f2, \ $CellContext`gcCW2]; Join[$CellContext`m1, $CellContext`m1, $CellContext`m2, $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m1], $CellContext`revSeq[$CellContext`m2]]], $CellContext`ssqCoreFlip[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`m1, $CellContext`m2, $CellContext`s1, \ $CellContext`s2, $CellContext`f1, $CellContext`f2}, If[$CellContext`nx <= 3, Return[{}]]; {$CellContext`s1, $CellContext`s2} = \ $CellContext`unpackLayers[$CellContext`nx, $CellContext`layers, True]; $CellContext`s2 = Select[$CellContext`s2, Length[$CellContext`s1] + 1 <= # <= Floor[$CellContext`nx/ 2]& ]; {$CellContext`f1, $CellContext`f2} = \ $CellContext`facePerm[{5, 4}, $CellContext`face]; $CellContext`m1 = {{$CellContext`f1, \ $CellContext`s2, $CellContext`gcCW}}; $CellContext`m2 = {{$CellContext`f2, \ $CellContext`s1, $CellContext`gcCW2}}; Join[$CellContext`m1, $CellContext`m2, $CellContext`m1, \ $CellContext`m2, $CellContext`m1, $CellContext`m2, $CellContext`m1, \ $CellContext`m2, $CellContext`m1]], $CellContext`seqFlip2BigCorners[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`bcSize, $CellContext`s1 = {}, $CellContext`s2 = Range[$CellContext`nx], $CellContext`f1 = 4, $CellContext`f2 = 5}, $CellContext`bcSize = Part[ $CellContext`countOuterLayers[$CellContext`nx, \ $CellContext`layers], 3]; Which[ Or[$CellContext`nx == 1, $CellContext`bcSize == $CellContext`nx], {{$CellContext`f1, \ $CellContext`s2, $CellContext`gcCW}, {$CellContext`f2, $CellContext`s2, \ $CellContext`gcCW}}, $CellContext`nx == 2, $CellContext`seqFlip2FaceDiagCorners[$CellContext`nx, \ $CellContext`f1, $CellContext`s1], $CellContext`bcSize == 0, $CellContext`ssqBigCornerFlip[$CellContext`nx, $CellContext`f1, \ $CellContext`s1], $CellContext`bcSize <= Floor[$CellContext`nx/2], $CellContext`seqFlip2CubeDiagCorners[$CellContext`nx, \ $CellContext`f1, Range[$CellContext`bcSize]], True, $CellContext`ssqBigCornerFlip[$CellContext`nx, $CellContext`f1, \ $CellContext`s1]]], $CellContext`ssqBigCornerFlip[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layers, Blank[]]] := Module[{$CellContext`s1, $CellContext`m1, $CellContext`m2, \ $CellContext`m3, $CellContext`m4}, If[$CellContext`nx <= 2, Return[{}]]; $CellContext`s1 = {}; $CellContext`m1 = \ $CellContext`seqSwap3EdgesSameCornerAlt[$CellContext`nx, 4, $CellContext`s1]; $CellContext`m2 = $CellContext`revSeq[ $CellContext`seqSwap3EdgesSameCornerAlt[$CellContext`nx, 7, $CellContext`s1]]; $CellContext`m3 = \ $CellContext`seqDots[$CellContext`nx, 4, $CellContext`s1]; $CellContext`m4 = \ $CellContext`ssqFlip2Corners[$CellContext`nx, 4, $CellContext`s1, 3]; Join[$CellContext`m1, $CellContext`m2, $CellContext`m3, \ $CellContext`m4]], $CellContext`randomMoves[ Pattern[$CellContext`nx, Blank[Integer]], Pattern[$CellContext`nummoves, Blank[Integer]]] := Table[ $CellContext`oneRandomMove[$CellContext`nx, True, "FRU"], {$CellContext`nummoves}], $CellContext`oneRandomMove[ Pattern[$CellContext`nx, Blank[Integer]], Optional[ Pattern[$CellContext`reduceOpt, Blank[]], True], Optional[ Pattern[$CellContext`notation, Blank[]], "FRU"]] := Module[{$CellContext`axis, $CellContext`layerlist, \ $CellContext`angleix, $CellContext`numlayers, $CellContext`randnx, \ $CellContext`r1, $CellContext`move1}, $CellContext`randnx = RandomInteger[{1, $CellContext`nx}]; $CellContext`r1 = RandomReal[]; $CellContext`layerlist = Which[$CellContext`r1 < 0.1, Range[$CellContext`nx], $CellContext`r1 < 0.7, {$CellContext`randnx}, $CellContext`nx <= 2, {$CellContext`randnx}, True, $CellContext`numlayers = RandomInteger[{2, $CellContext`nx - 1}]; Sort[ RandomSample[ Range[$CellContext`nx], $CellContext`numlayers]]]; \ $CellContext`axis = Which[$CellContext`notation == "FRU", RandomInteger[{4, 9}], $CellContext`notation == "XYZ", RandomInteger[{1, 3}], True, RandomInteger[{4, 9}]]; $CellContext`angleix = RandomChoice[$CellContext`gcCW8020]; $CellContext`move1 = \ {$CellContext`axis, $CellContext`layerlist, $CellContext`angleix}; If[ And[ 4 <= $CellContext`axis <= 9, $CellContext`reduceOpt], $CellContext`move1 = \ $CellContext`mfReduceFRU[$CellContext`nx, $CellContext`move1]]; \ $CellContext`move1], $CellContext`gcCW8020 = {2, 4, 2, 4, 2, 4, 2, 4, 3, 5}, $CellContext`mfReduceFRU[ Pattern[$CellContext`nx, Blank[Integer]], Pattern[$CellContext`moveFRU1, Blank[]]] := Module[{$CellContext`laylist, $CellContext`laylistc}, \ {$CellContext`laylist, $CellContext`laylistc} = \ $CellContext`mfLayersAndCompl[$CellContext`nx, Part[$CellContext`moveFRU1, 2]]; Which[Total[$CellContext`laylist] < Total[$CellContext`laylistc], $CellContext`moveFRU1, Total[$CellContext`laylist] > Total[$CellContext`laylistc], $CellContext`mfOppositeMoveFRU[$CellContext`nx, \ $CellContext`moveFRU1], Part[$CellContext`moveFRU1, 1] <= 6, $CellContext`moveFRU1, True, $CellContext`mfOppositeMoveFRU[$CellContext`nx, \ $CellContext`moveFRU1]]], $CellContext`mfOppositeMoveFRU[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveFRU, Blank[]]] := Module[{$CellContext`face = Part[$CellContext`moveFRU, 1], $CellContext`layersFRU = Part[$CellContext`moveFRU, 2], $CellContext`dirFRU = Part[$CellContext`moveFRU, 3], $CellContext`laylist, $CellContext`laylistc, \ $CellContext`moveOppFRU}, Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layersFRU], "layersFRU in mfOppositeMoveFRU"]; {$CellContext`laylist, \ $CellContext`laylistc} = $CellContext`mfLayersAndCompl[$CellContext`nx, \ $CellContext`layersFRU]; $CellContext`moveOppFRU = { $CellContext`mfOppositeFace[$CellContext`face], \ $CellContext`laylistc, $CellContext`mfOppositeDir[$CellContext`dirFRU]}; \ $CellContext`moveOppFRU], $CellContext`mfOppositeFace[ Condition[ Pattern[$CellContext`f, Blank[Integer]], 1 <= $CellContext`f <= $CellContext`gcMaxFaceIx]] := \ ($CellContext`mfOppositeFace[$CellContext`f] = Part[{1, 2, 3, 7, 8, 9, 4, 5, 6}, $CellContext`f]), $CellContext`randomDemo[ Pattern[$CellContext`nx, Blank[Integer]], Pattern[$CellContext`nummoves, Blank[Integer]]] := Module[{$CellContext`m1}, $CellContext`m1 = \ $CellContext`randomMoves[$CellContext`nx, $CellContext`nummoves]; Join[$CellContext`m1, $CellContext`reverseSequence[$CellContext`m1]]], \ $CellContext`reverseSequence[ Pattern[$CellContext`moves, Blank[]]] := $CellContext`revSeq[$CellContext`moves], \ $CellContext`demoViewOptions[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`viewOpts = {1, 2, 3}}, Join[ $CellContext`demoTransition[$CellContext`nx, 4, $CellContext`gcCCW], $CellContext`saShowCores[False], $CellContext`saPause[200], Flatten[ Map[Join[ $CellContext`saViewOpt[#], $CellContext`saPause[1000]]& , $CellContext`viewOpts], 1], $CellContext`saViewOpt[1], $CellContext`saPause[1000], $CellContext`saShowCores[True], Flatten[ Map[Join[ $CellContext`saViewOpt[#], $CellContext`saPause[1000]]& , $CellContext`viewOpts], 1], $CellContext`saViewOpt[1], $CellContext`saPause[1000], $CellContext`saShowCores[False]]], $CellContext`demoTransition[ Pattern[$CellContext`nx, Blank[Integer]], Pattern[$CellContext`face, Blank[Integer]], Optional[ Pattern[$CellContext`dir, Blank[Integer]], 4]] := Module[{$CellContext`m1}, $CellContext`m1 = \ $CellContext`seqRipple[$CellContext`nx, $CellContext`face, $CellContext`dir]; Join[ $CellContext`saNumSteps[1], $CellContext`m1, $CellContext`reverseSequence[$CellContext`m1], $CellContext`saNumSteps[3]]], $CellContext`saNumSteps[ Pattern[$CellContext`n, Blank[]]] := {{$CellContext`xsaNumSteps, {$CellContext`n}, 2}}, $CellContext`saShowCores[ Pattern[$CellContext`tf, Blank[]]] := ($CellContext`saShowCores[$CellContext`tf] = \ {{$CellContext`xsaShowCores, { If[$CellContext`tf, 1, 0]}, 2}}), $CellContext`saPause[ Pattern[$CellContext`msec, Blank[]]] := {{$CellContext`xsaPause, {$CellContext`msec}, 2}}, $CellContext`saViewOpt[ Pattern[$CellContext`opt, Blank[]]] := ($CellContext`saViewOpt[$CellContext`opt] = \ {{$CellContext`xsaViewOpt, {$CellContext`opt}, 2}}), $CellContext`demoSubcubeSizes[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`scSizes = 5 ($CellContext`downUpRange[13, 8] + 7)}, Join[ $CellContext`demoTransition[$CellContext`nx, 5, $CellContext`gcCCW], $CellContext`saShowCores[False], $CellContext`saViewOpt[1], Flatten[ Map[$CellContext`saSubcubeSize[#]& , $CellContext`scSizes], 1], $CellContext`saSubcubeSize[$CellContext`gcInitSubcubeSize]]], \ $CellContext`downUpRange[ Pattern[$CellContext`len, Blank[]], Pattern[$CellContext`start, Blank[]]] := Module[{$CellContext`r1 = Table[$CellContext`i, {$CellContext`i, $CellContext`start, 1, -1}], $CellContext`r2 = Table[$CellContext`i, {$CellContext`i, 2, $CellContext`len}], $CellContext`r3 = Table[$CellContext`i, {$CellContext`i, $CellContext`len - 1, $CellContext`start, -1}]}, Join[$CellContext`r1, $CellContext`r2, $CellContext`r3]], \ $CellContext`saSubcubeSize[ Pattern[$CellContext`sz, Blank[]]] := {{$CellContext`xsaSubcubeSize, {$CellContext`sz}, 2}}, $CellContext`gcInitSubcubeSize = 75, $CellContext`demoFaceColors[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`mCheckers, $CellContext`mRand, \ $CellContext`mAlts, $CellContext`mPerm, $CellContext`mJoin, \ $CellContext`mRiff, $CellContext`pt = 300}, $CellContext`mCheckers = \ $CellContext`seqCheckers[$CellContext`nx, 4, {}]; $CellContext`mRand = Map[$CellContext`saChangeFaceColors[2]& , Range[2]]; $CellContext`mAlts = Map[$CellContext`saAltFaceColors[#]& , {3, 9}]; $CellContext`mPerm = Map[$CellContext`saChangeFaceColors[6]& , Range[2]]; $CellContext`mJoin = Join[$CellContext`mRand, $CellContext`mAlts, $CellContext`mPerm]; \ $CellContext`mRiff = Riffle[ Flatten[$CellContext`mJoin, 1], $CellContext`saPause[$CellContext`pt]]; Join[ $CellContext`demoTransition[$CellContext`nx, 4], $CellContext`saChangeFaceColors[1], $CellContext`saPause[$CellContext`pt], $CellContext`saSubcubeSize[100], $CellContext`saPause[$CellContext`pt], $CellContext`mCheckers, $CellContext`saPause[$CellContext`pt], $CellContext`mRiff, $CellContext`saPause[$CellContext`pt], $CellContext`saChangeFaceColors[1], $CellContext`saPause[$CellContext`pt], $CellContext`mCheckers, $CellContext`saPause[$CellContext`pt], $CellContext`saSubcubeSize[$CellContext`gcInitSubcubeSize]]], \ $CellContext`saChangeFaceColors[ Pattern[$CellContext`ix, Blank[]]] := {{$CellContext`xsaChangeFaceColors, \ {$CellContext`ix}, 2}}, $CellContext`saAltFaceColors[ Pattern[$CellContext`ix, Blank[]]] := {{$CellContext`xsaAltFaceColors, {$CellContext`ix}, 2}}, $CellContext`demoEdgeColors[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`edgeThicks = $CellContext`downUpRange[11, 5] - 1, $CellContext`mThks, $CellContext`mRiffThks, \ $CellContext`edgeColors = Tuples[{0, 1}, 3] 100, $CellContext`mCols, $CellContext`mRiffCols}, \ $CellContext`mCols = Map[$CellContext`saEdgeColor[#]& , $CellContext`edgeColors]; \ $CellContext`mThks = Map[$CellContext`saEdgeTh[#]& , $CellContext`edgeThicks]; \ $CellContext`mRiffThks = Riffle[ Flatten[$CellContext`mThks, 1], $CellContext`saPause[100]]; $CellContext`mRiffCols = Riffle[ Flatten[$CellContext`mCols, 1], $CellContext`saPause[300]]; Join[ $CellContext`demoTransition[$CellContext`nx, 6], $CellContext`mRiffThks, $CellContext`saPause[1000], $CellContext`saResetThColors[], $CellContext`mRiffCols, $CellContext`saPause[1000], $CellContext`saResetThColors[]]], $CellContext`saEdgeColor[ Pattern[$CellContext`rgb, Blank[]]] := {{$CellContext`xsaEdgeColor, $CellContext`rgb, 2}}, $CellContext`saEdgeTh[ Pattern[$CellContext`ix, Blank[]]] := {{$CellContext`xsaEdgeTh, {$CellContext`ix}, 2}}, $CellContext`saResetThColors[] := \ {{$CellContext`xsaResetThColors, {1}, 2}}, $CellContext`demoRingColors[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`ringThicks = Range[0, 7], $CellContext`mThks, $CellContext`mRiffThks, \ $CellContext`ringColors = Tuples[{0, 1}, 3] 100, $CellContext`mCols, $CellContext`mRiffCols, \ $CellContext`faces = {4, 5, 6, 7, 8, 9, 4}, $CellContext`mFace, $CellContext`mRiffFace, $CellContext`pt = 350}, $CellContext`mThks = Map[$CellContext`saRingTh[#]& , $CellContext`ringThicks]; \ $CellContext`mCols = Map[$CellContext`saRingColor[#]& , Part[$CellContext`ringColors, Span[1, 4]]]; $CellContext`mFace = Map[$CellContext`saSelectFace[#]& , $CellContext`faces]; \ $CellContext`mRiffThks = Riffle[ Flatten[$CellContext`mThks, 1], $CellContext`saPause[$CellContext`pt]]; $CellContext`mRiffCols = Riffle[ Flatten[$CellContext`mCols, 1], $CellContext`saPause[$CellContext`pt]]; $CellContext`mRiffFace = Riffle[ Flatten[$CellContext`mFace, 1], $CellContext`saPause[$CellContext`pt]]; Join[ $CellContext`demoTransition[$CellContext`nx, 7], $CellContext`saClearLayers[], $CellContext`saRingTh[0], $CellContext`saSelectFace[6], $CellContext`saSelectLayers[{1, 3}], $CellContext`saForceRings[True], $CellContext`saShowRings[True], $CellContext`mRiffThks, $CellContext`saPause[$CellContext`pt], $CellContext`mRiffCols, $CellContext`saPause[$CellContext`pt], $CellContext`mRiffFace, $CellContext`saPause[$CellContext`pt], $CellContext`saClearLayers[], $CellContext`saForceRings[True], $CellContext`seqRipple[$CellContext`nx, 6], $CellContext`saForceRings[False], $CellContext`seqCheckers[$CellContext`nx, 4, {}], $CellContext`seqCheckers[$CellContext`nx, 6, {}], $CellContext`seqRipple[$CellContext`nx, 9], $CellContext`saClearForceRings[], $CellContext`saRingTh[$CellContext`gcDfltRingTh]]], \ $CellContext`saRingTh[ Pattern[$CellContext`ix, Blank[]]] := {{$CellContext`xsaRingTh, {$CellContext`ix}, 2}}, $CellContext`saRingColor[ Pattern[$CellContext`rgb, Blank[]]] := {{$CellContext`xsaRingColor, $CellContext`rgb, 2}}, $CellContext`saSelectFace[ Pattern[$CellContext`f, Blank[]]] := {{$CellContext`xsaSelectFace, {$CellContext`f}, 2}}, $CellContext`saClearLayers[] := \ {{$CellContext`xsaClearLayers, {}, 2}}, $CellContext`saSelectLayers[ Pattern[$CellContext`laylist, Blank[]]] := {{$CellContext`xsaSelectLayers, $CellContext`laylist, 2}}, $CellContext`saForceRings[ Pattern[$CellContext`tf, Blank[]]] := {{$CellContext`xsaForceRings, { If[$CellContext`tf, 1, 0]}, 2}}, $CellContext`saShowRings[ Pattern[$CellContext`tf, Blank[]]] := {{$CellContext`xsaShowRings, { If[$CellContext`tf, 1, 0]}, 2}}, $CellContext`saClearForceRings[] := \ {{$CellContext`xsaClearForceRings, {}, 2}}, $CellContext`demoBkgdColors[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`colorPcts = {50, 100}}, Join[ $CellContext`demoTransition[$CellContext`nx, 8], Flatten[ Map[Join[ $CellContext`saBkgdColor[{#, 80, 80}], $CellContext`saPause[200]]& , $CellContext`colorPcts], 1], Flatten[ Map[Join[ $CellContext`saBkgdColor[{80, #, 80}], $CellContext`saPause[200]]& , $CellContext`colorPcts], 1], Flatten[ Map[Join[ $CellContext`saBkgdColor[{80, 80, #}], $CellContext`saPause[200]]& , $CellContext`colorPcts], 1], $CellContext`saResetThColors[]]], $CellContext`saBkgdColor[ Pattern[$CellContext`rgb, Blank[]]] := {{$CellContext`xsaBkgdColor, $CellContext`rgb, 2}}, $CellContext`demoInvis[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`mCheckers}, $CellContext`mCheckers = \ $CellContext`seqCheckers[$CellContext`nx, 4, {}]; Join[ $CellContext`demoTransition[$CellContext`nx, 5], $CellContext`saClearInvis[], $CellContext`saWireFrame[False], $CellContext`saInvis[1, {2}], $CellContext`saPause[500], $CellContext`saInvis[2, {2}], $CellContext`saPause[500], $CellContext`saInvis[3, {2}], $CellContext`saPause[500], $CellContext`mCheckers, $CellContext`saPause[500], $CellContext`saWireFrame[True], $CellContext`mCheckers, $CellContext`saPause[500], $CellContext`saWireFrame[False], $CellContext`saClearInvis[], $CellContext`saClearLayers[], $CellContext`saPause[ 500]]], $CellContext`saClearInvis[] := \ {{$CellContext`xsaClearInvis, {1}, 2}}, $CellContext`saWireFrame[ Pattern[$CellContext`tf, Blank[]]] := ($CellContext`saWireFrame[$CellContext`tf] = \ {{$CellContext`xsaWireFrame, { If[$CellContext`tf, 1, 0]}, 2}}), $CellContext`saInvis[ Pattern[$CellContext`xyz, Blank[]], Pattern[$CellContext`layers, Blank[]]] := {{$CellContext`xsaInvis, $CellContext`layers, \ $CellContext`xyz}}, $CellContext`demoShowMisAl[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`rot360Up = Flatten[ Table[{{6, Range[$CellContext`nx], $CellContext`gcCW}, First[ $CellContext`saPause[200]]}, {4}], 1], $CellContext`pt = 500}, Join[ $CellContext`demoTransition[$CellContext`nx, 6, $CellContext`gcCCW], $CellContext`saShowMisAl[1], $CellContext`saWireFrame[False], $CellContext`saClearInvis[], $CellContext`saSubcubeSize[100], $CellContext`saPause[$CellContext`pt], $CellContext`seqRotateMidFaces180Deg[$CellContext`nx, 5, {}], $CellContext`saPause[4 $CellContext`pt], Flatten[ Map[$CellContext`saSubcubeSize[#]& , {90, 80, 70, 60, 60}], 1], $CellContext`saPause[$CellContext`pt], Flatten[ Map[$CellContext`saSubcubeSize[#]& , { 60, 70, $CellContext`gcInitSubcubeSize}], 1], $CellContext`saPause[$CellContext`pt], $CellContext`saShowMisAl[3], $CellContext`saPause[$CellContext`pt], $CellContext`saWireFrame[True], $CellContext`saPause[$CellContext`pt], $CellContext`rot360Up, $CellContext`saShowMisAl[2], $CellContext`saPause[$CellContext`pt], $CellContext`rot360Up, $CellContext`seqRotateMidFaces180Deg[$CellContext`nx, 5, {}], $CellContext`saWireFrame[False], $CellContext`saPause[$CellContext`pt], $CellContext`saShowMisAl[1], $CellContext`saPause[$CellContext`pt]]], $CellContext`saShowMisAl[ Pattern[$CellContext`opt, Blank[]]] := ($CellContext`saShowMisAl[$CellContext`opt] = \ {{$CellContext`xsaShowMisAl, {$CellContext`opt}, 2}}), $CellContext`demoPerspective[ Pattern[$CellContext`nx, Blank[Integer]]] := Join[ $CellContext`demoTransition[$CellContext`nx, 9], $CellContext`saViewPtReset[], Flatten[ Riffle[ Map[$CellContext`saViewPtMult[#]& , $CellContext`downUpRange[8, 4]], { $CellContext`saPause[30]}], 1], Flatten[ Map[$CellContext`saViewPtAngle[7, #]& , $CellContext`downUpRange[13, 5]], 1], Flatten[ Map[$CellContext`saViewPtAngle[#, 5]& , $CellContext`downUpRange[13, 7]], 1], $CellContext`saViewPtReset[]], $CellContext`saViewPtReset[] := \ {{$CellContext`xsaViewPtReset, {1}, 2}}, $CellContext`saViewPtMult[ Pattern[$CellContext`ix, Blank[]]] := {{$CellContext`xsaViewPtMult, {$CellContext`ix}, 2}}, $CellContext`saViewPtAngle[ Pattern[$CellContext`ix1, Blank[]], Pattern[$CellContext`ix2, Blank[]]] := {{$CellContext`xsaViewPtAngle, {$CellContext`ix1, \ $CellContext`ix2}, 2}}, $CellContext`demoNumSteps[ Pattern[$CellContext`nx, Blank[Integer]]] := Module[{$CellContext`mSteps1, $CellContext`mSteps2, \ $CellContext`mSteps3, $CellContext`mRippl1, $CellContext`mRippl2, \ $CellContext`mRippl3, $CellContext`tbl1, $CellContext`tbl2, \ $CellContext`tbl3}, $CellContext`mSteps1 = Map[$CellContext`saNumSteps[#]& , {2, 5, 8}]; $CellContext`mSteps2 = $CellContext`saNumSteps[ 1]; $CellContext`mSteps3 = Map[$CellContext`saNumSteps[#]& , {7, 4, 3}]; $CellContext`mRippl1 = Map[$CellContext`seqRipple[$CellContext`nx, #]& , {4, 5, 6}]; $CellContext`mRippl2 = Map[$CellContext`seqRipple[$CellContext`nx, #]& , {7, 8, 9, 4, 5, 6}]; $CellContext`mRippl3 = Map[$CellContext`seqRipple[$CellContext`nx, #]& , {7, 8, 9}]; $CellContext`tbl1 = Table[{ Part[$CellContext`mSteps1, $CellContext`i], Part[$CellContext`mRippl1, $CellContext`i]}, {$CellContext`i, 3}]; $CellContext`tbl2 = Table[{ Part[$CellContext`mRippl2, $CellContext`i]}, {$CellContext`i, 6}]; $CellContext`tbl3 = Table[{ Part[$CellContext`mSteps3, $CellContext`i], Part[$CellContext`mRippl3, $CellContext`i]}, {$CellContext`i, 3}]; Flatten[ Join[$CellContext`tbl1, {{$CellContext`mSteps2}}, \ $CellContext`tbl2, $CellContext`tbl3], 2]], $CellContext`demoAll[ Pattern[$CellContext`nx, Blank[Integer]]] := Join[ $CellContext`demoInit[$CellContext`nx], $CellContext`demoViewOptions[$CellContext`nx], $CellContext`demoSubcubeSizes[$CellContext`nx], $CellContext`demoFaceColors[$CellContext`nx], $CellContext`demoEdgeColors[$CellContext`nx], $CellContext`demoRingColors[$CellContext`nx], $CellContext`demoBkgdColors[$CellContext`nx], $CellContext`demoInvis[$CellContext`nx], $CellContext`demoShowMisAl[$CellContext`nx], $CellContext`demoPerspective[$CellContext`nx], $CellContext`demoNumSteps[$CellContext`nx]], $CellContext`demoInit[ Pattern[$CellContext`nx, Blank[Integer]]] := Join[ $CellContext`saShowMisAl[1], $CellContext`saWireFrame[False], $CellContext`saClearInvis[], $CellContext`saSolvedCube[], $CellContext`saChangeFaceColors[1], $CellContext`saViewOpt[1], $CellContext`saShowCores[False], $CellContext`saSubcubeSize[$CellContext`gcInitSubcubeSize]], \ $CellContext`saSolvedCube[] := {{$CellContext`xsaSolvedCube, {1}, 2}}, $CellContext`setMoveSeq[ Pattern[$CellContext`moves$, Blank[]], Optional[ Pattern[$CellContext`rev$, Blank[]], False]] := ( If[$CellContext`gsHistPtr != $CellContext`gsHistBufferLength, $CellContext`histTrunc[]]; $CellContext`gsHistTraversing = 0; $CellContext`cvMoves$$ = If[$CellContext`rev$, $CellContext`reverseSequence[$CellContext`moves$], \ $CellContext`moves$]; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = Length[$CellContext`cvMoves$$]; Null), $CellContext`gcViewPtAngle1 = {0.2617993877991494, 1.3043824685233751`}, $CellContext`gcViewPtAngle2 = { 1.3089969389957472`, 0.25718491732677745`}, $CellContext`gcViewPtAngleDelta = { 0.08726646259971647, -0.08726646259971647}, $CellContext`doFS1[ Pattern[$CellContext`dir$, Blank[]]] := $CellContext`doSeqFaceLayerList[$CellContext`cvNx$$, \ $CellContext`cvSelectedFace$$, $CellContext`cvSelectedLayersFRU$$, \ $CellContext`dir$], $CellContext`doSeqFaceLayerList[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`selface$, Blank[]], Pattern[$CellContext`sellayers$, Blank[]], Pattern[$CellContext`angleix$, Blank[]]] := Module[{$CellContext`move$, $CellContext`layers$}, \ $CellContext`layers$ = $CellContext`mfCleanLayers[$CellContext`nx$, \ $CellContext`sellayers$]; $CellContext`move$ = \ $CellContext`buildBasicMove[$CellContext`nx$, $CellContext`selface$, \ $CellContext`layers$, $CellContext`angleix$]; $CellContext`cvSeqDesc$$ = StringJoin["Basic Move ", $CellContext`mfMove2Text[$CellContext`nx$, First[$CellContext`move$]]]; \ $CellContext`setMoveSeq[$CellContext`move$, False]; $CellContext`cvShowRingsTemp$$ = True; Null], $CellContext`buildBasicMove[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`face, Blank[]], Pattern[$CellContext`layerlist, Blank[]], Pattern[$CellContext`dir, Blank[]]] := Module[{$CellContext`laylist, $CellContext`move}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in buildBasicMove"]; Assert[4 <= $CellContext`face <= $CellContext`gcMaxFaceIx, "face in buildBasicMove"]; Assert[2 <= $CellContext`dir <= 5, "dir in buildBasicMove"]; Assert[ $CellContext`mfCleanLLQ[$CellContext`nx, $CellContext`layerlist], "layerlist in buildBasicMove"]; $CellContext`laylist = If[Length[$CellContext`layerlist] <= 0, {1}, $CellContext`mfCleanLayers[$CellContext`nx, \ $CellContext`layerlist]]; $CellContext`move = {{$CellContext`face, \ $CellContext`laylist, $CellContext`dir}}; $CellContext`move], \ $CellContext`doSeqWholeCube[ Pattern[$CellContext`nx$, Blank[]], Pattern[$CellContext`face$, Blank[]], Pattern[$CellContext`angleix$, Blank[]]] := ($CellContext`cvSeqDesc$$ = StringJoin["Whole-Cube ", Part[{"Front ", "Right ", "Up "}, $CellContext`face$ - 3], Part[{"CCW", "CCW2", "CW", "CCW"}, $CellContext`angleix$ - 1], " (1)"]; $CellContext`setMoveSeq[ $CellContext`seqWholeCube[$CellContext`nx$, $CellContext`face$, \ $CellContext`angleix$], False]; $CellContext`cvShowRingsTemp$$ = False; Null), $CellContext`recBackspace[] := ( If[$CellContext`gsRecBuffLen > 0, Part[$CellContext`gbRecIntBuffer, $CellContext`gsRecBuffLen] = 0; Decrement[$CellContext`gsRecBuffLen]; Null]; Null), $CellContext`recUdsSave[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`ix, Blank[]], Pattern[$CellContext`fmt, Blank[]], Pattern[$CellContext`saveopt, Blank[]]] := Module[{$CellContext`recbuffempty = $CellContext`gsRecBuffLen <= 0, $CellContext`currudsempty = Length[ Part[$CellContext`gsUserSeq, $CellContext`ix]] <= 0, $CellContext`recbuffmoves, $CellContext`currudsmoves, \ $CellContext`seqname}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in recUdsSave"]; Assert[1 <= $CellContext`ix <= $CellContext`gcNumUserSeqs, "ix in recUdsSave"]; Assert[ Or[$CellContext`saveopt == "Save", $CellContext`saveopt == "Overwrite", $CellContext`saveopt == "Append"], "saveopt in recUdsSave"]; If[$CellContext`recbuffempty, Return[]]; $CellContext`recbuffmoves = Map[$CellContext`mfInt2Move, Take[$CellContext`gbRecIntBuffer, $CellContext`gsRecBuffLen]]; If[$CellContext`currudsempty, \ $CellContext`recUdsOverwriteMoves[$CellContext`nx, $CellContext`ix, \ $CellContext`fmt, $CellContext`recbuffmoves]; Return[]]; If[ Or[$CellContext`saveopt == "Overwrite", $CellContext`saveopt == "Append"], $CellContext`gsLastDeletedUds = Part[$CellContext`gsUserSeq, $CellContext`ix]; \ $CellContext`gsLastDeletedUdsName = Part[$CellContext`gsUserSeqName, $CellContext`ix]]; Which[$CellContext`saveopt == "Save", Null, $CellContext`saveopt == "Overwrite", $CellContext`recUdsOverwriteMoves[$CellContext`nx, \ $CellContext`ix, $CellContext`fmt, $CellContext`recbuffmoves], \ $CellContext`saveopt == "Append", $CellContext`recUdsOverwriteMoves[$CellContext`nx, \ $CellContext`ix, $CellContext`fmt, Join[ Part[$CellContext`gsUserSeq, $CellContext`ix], \ $CellContext`recbuffmoves]], True, "Error in recUdsSave: bad saveopt"]; Null], $CellContext`recUdsOverwriteMoves[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`ix, Blank[]], Pattern[$CellContext`fmt, Blank[]], Pattern[$CellContext`moves, Blank[]]] := ( Part[$CellContext`gsUserSeq, $CellContext`ix] = If[Length[$CellContext`moves] <= $CellContext`gcMaxUdsMoves, \ $CellContext`moves, Take[$CellContext`moves, $CellContext`gcMaxUdsMoves]]; Part[$CellContext`gsUserSeqName, $CellContext`ix] = \ $CellContext`recUdsName[$CellContext`nx, $CellContext`moves, $CellContext`fmt, 10, 18]; Null), $CellContext`gcMaxUdsMoves = 6200, $CellContext`recUdsName[ Pattern[$CellContext`nx, Blank[]], Pattern[$CellContext`moveseq, Blank[]], Pattern[$CellContext`fmt, Blank[]], Optional[ Pattern[$CellContext`maxmoves, Blank[]], 5], Optional[ Pattern[$CellContext`maxchars, Blank[]], 8]] := Module[{$CellContext`len = Length[$CellContext`moveseq], $CellContext`firstmoves, \ $CellContext`text, $CellContext`chars}, Assert[1 <= $CellContext`nx <= $CellContext`gcMaxCubeLength, "nx in recUdsName"]; Assert[ Or[$CellContext`fmt == "FRU", $CellContext`fmt == "RCN"], "fmt in recUdsName"]; If[$CellContext`len <= 0, Return[""]]; $CellContext`firstmoves = Take[$CellContext`moveseq, Min[$CellContext`maxmoves, $CellContext`len]]; \ $CellContext`text = Switch[$CellContext`gcMoveTextFormat, "FRU", StringJoin[ Riffle[ Map[$CellContext`mfMove2Text[$CellContext`nx, #, False]& , $CellContext`firstmoves], " "]], "RCN", StringJoin[ Riffle[ Map[$CellContext`mfMove2Text[$CellContext`nx, #, True]& , $CellContext`firstmoves], " "]]]; $CellContext`chars = If[StringLength[$CellContext`text] <= $CellContext`maxchars, \ $CellContext`text, StringJoin[ StringTake[$CellContext`text, $CellContext`maxchars - 3], "..."]]; StringJoin["(", ToString[$CellContext`len], ")", $CellContext`chars]], $CellContext`recUdsDelete[ Pattern[$CellContext`ix, Blank[]]] := ( Assert[1 <= $CellContext`ix <= $CellContext`gcNumUserSeqs, "ix in recUdsDelete"]; If[Length[ Part[$CellContext`gsUserSeq, $CellContext`ix]] <= 0, Return[]]; $CellContext`gsLastDeletedUds = Part[$CellContext`gsUserSeq, $CellContext`ix]; \ $CellContext`gsLastDeletedUdsName = Part[$CellContext`gsUserSeqName, $CellContext`ix]; Part[$CellContext`gsUserSeq, $CellContext`ix] = {}; Part[$CellContext`gsUserSeqName, $CellContext`ix] = ""; Null), $CellContext`recUdsRestore[ Pattern[$CellContext`ix, Blank[]]] := ( Assert[1 <= $CellContext`ix <= $CellContext`gcNumUserSeqs, "ix in recUdsRestore"]; If[ And[Length[ Part[$CellContext`gsUserSeq, $CellContext`ix]] <= 0, Length[$CellContext`gsLastDeletedUds] > 0], Part[$CellContext`gsUserSeq, $CellContext`ix] = \ $CellContext`gsLastDeletedUds; Part[$CellContext`gsUserSeqName, $CellContext`ix] = \ $CellContext`gsLastDeletedUdsName; Null]), $CellContext`doSeqUser[ Pattern[$CellContext`ix$, Blank[]], Pattern[$CellContext`nx$, Blank[]], Optional[ Pattern[$CellContext`rev$, Blank[]], False]] := Module[{$CellContext`moves$, $CellContext`len$}, Assert[1 <= $CellContext`ix$ <= $CellContext`gcNumUserSeqs, "ix in doSeqUser"]; $CellContext`moves$ = Part[$CellContext`gsUserSeq, $CellContext`ix$]; $CellContext`len$ = Length[$CellContext`moves$]; If[$CellContext`len$ <= 0, $CellContext`cvMoves$$ = {}; $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = 0; Return[]]; $CellContext`cvSeqDesc$$ = StringJoin["User-Defined Seq ", ToString[$CellContext`ix$], If[$CellContext`rev$, " ", ""], " (", ToString[$CellContext`len$], ")"]; $CellContext`setMoveSeq[$CellContext`moves$, \ $CellContext`rev$]; $CellContext`cvShowRingsTemp$$ = False; Null], $CellContext`histMovePtr[ Pattern[$CellContext`nummoves$, Blank[]]] := Module[{$CellContext`oldptr$, $CellContext`newptr$, \ $CellContext`moves$}, If[$CellContext`cvNumMoves$$ > 0, Return[]]; $CellContext`oldptr$ = $CellContext`gsHistPtr; \ $CellContext`newptr$ = Clip[$CellContext`gsHistPtr + $CellContext`nummoves$, { 0, $CellContext`gsHistBufferLength}]; \ $CellContext`gsHistTraversing = Sign[$CellContext`nummoves$]; $CellContext`moves$ = Which[$CellContext`nummoves$ > 0, Table[ $CellContext`mfInt2Move[ Part[$CellContext`gbHistIntBuffer, $CellContext`i]], \ {$CellContext`i, $CellContext`oldptr$ + 1, $CellContext`newptr$}], $CellContext`nummoves$ < 0, $CellContext`reverseSequence[ Table[ $CellContext`mfInt2Move[ Part[$CellContext`gbHistIntBuffer, $CellContext`i]], \ {$CellContext`i, $CellContext`newptr$ + 1, $CellContext`oldptr$}]], True, {}]; $CellContext`cvMoves$$ = $CellContext`moves$; \ $CellContext`cvMovesIx$$ = 1; $CellContext`cvNumMoves$$ = Length[$CellContext`cvMoves$$]; $CellContext`cvSeqDesc$$ = StringJoin["History ", If[$CellContext`nummoves$ > 0, "", ""], " (", ToString[ Length[$CellContext`moves$]], ")"]; $CellContext`cvShowRingsTemp$$ = False; Null]}; ($HistoryLength = 0; $CellContext`debugStartTime = AbsoluteTime[]; $CellContext`debugElapsedTime = 0.; $CellContext`initGlobalConstants[]; \ $CellContext`initGlobalVariables[]; $CellContext`histInit[]; \ $CellContext`recClear[]; $CellContext`udsClearAll[]; Null)}; Typeset`initDone$$ = True), SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False, LineColor->GrayLevel[0], FrontFaceColor->GrayLevel[0], BackFaceColor->GrayLevel[0], GraphicsColor->GrayLevel[0], FontColor->GrayLevel[0], Background->RGBColor[0.9, 0.9, 1.], Framed -> True], Manipulate`InterpretManipulate[1]]], "Output"] }, WindowSize->{1232, 906}, Visible->True, ScrollingOptions->{"VerticalScrollRange"->Fit}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, ShowCellBracket->Automatic, ShowSelection->True, CellContext->Notebook, TrackCellChangeTimes->False, Magnification:>1.05 Inherited, FrontEndVersion->"10.1 for Microsoft Windows (64-bit) (March 23, 2015)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1464, 33, 370077, 6970, 842, "Output"] } ] *) (* End of internal cache information *) (* NotebookSignature bx0EF9cxurVb6B1bwyT1CW9d *)