with(linalg): with(plots): read(`c:/maplev4/share/games/rubik/rubik.txt`): A1:=matrix([[1,1,1,6,6,6,3,3,3], [1,1,1,6,6,6,3,3,3], [1,1,1,6,6,6,3,3,3], [2,2,2,5,5,5,4,4,4], [2,2,2,5,5,5,4,4,4], [2,2,2,5,5,5,4,4,4]]); corner_2cycle:=[R,F,R^(-1),F,R,F^2,R^(-1),L^(-1),F^(-1),L,F^(-1),L^(-1),F^2,L]; #a 2 corner rotation (J. Trapp) - [DS], p24 rc(corner_2cycle,A1); corner_3cycle:=[R,D,R^(-1),U,R,D^(-1),R^(-1),U^(-1)]; A:=rc(corner_3cycle,A1): display3d(A,orientation=[-150,80],title=`[R,D,R^(-1),U,R,D^(-1),R^(-1),U^(-1)]`);