Rotations of the Cube

advertisement
Rotations of the Cube
This worksheet shows all the rotations of the cube. Ignore the man behind the
curtain.
> with(group): with(plots): with(plottools): with(ListTools): with
(ColorTools):
> NumSides := 6;
(1)
> prepend := proc(item, list) [item, op(list)]; end;
(2)
> append := proc(list, item) [op(list), item]; end;
(3)
These are are generators, expressed in cycle notation
> alpha := [[2,3,5,4]]; beta := [[1,2,6,5]];
(4)
> pg := permgroup(NumSides, {alpha,beta});
(5)
This is a display of all the elements of the group, in disjoint cycle notation:
> groupelscycles:=elements(pg);
(6)
Check the number of elements in the group.
> nops(groupelscycles);
24
(7)
Here are all the group elements, displayed as the bottom row of the two row
notation.
> GroupElements := map(convert, groupelscycles, 'permlist',
(8)
>
NumSides);
(8)
Start Ignoring:
> applyperm := proc(perm, list)
> [seq(list[perm[i]], i=1..NumSides)];
> end;
(9)
> CyclesToList := proc(perm)
convert(perm, 'permlist', NumSides);
end;
(10)
> ListToCycles := proc(plist)
convert(plist,'disjcyc');
end;
(11)
> MultiplyInCycles := proc(perm1, perm2)
> mulperms(perm2, perm1);
> end;
(12)
> MultiplyInLists := proc(plist1, plist2)
CyclesToList(MultiplyInCycles(ListToCycles(plist1), ListToCycles
(plist2)));
> end;
(13)
> InverseCycles := proc(perm)
invperm(perm);
(14)
>
end;
(14)
> InverseList := proc(plist)
CyclesToList(invperm(ListToCycles(plist)));
> end;
(15)
> offset:=0.15;
(16)
> font := ["times", "roman", 18];
(17)
> flt := [1,-1,1];
(18)
> frt := [1,1,1];
(19)
> frb := [1,1,-1];
(20)
> flb := [1,-1,-1];
(21)
> klb:= [-1,-1,-1];
(22)
> krb := [-1,1, -1];
(23)
> krt := [-1,1,1];
(24)
> klt := [-1,-1,1];
(25)
> face6 := [flb,frb,krb,klb]; #
(26)
> place6 := [0,0,-1-offset]; #
(27)
> face2 := [flt,frt,frb,flb]; #
(28)
> place2 := [1+offset, 0, 0]; #
(29)
> face4 := [flt, klt,klb,flb]; #
(30)
> place4 := [0, -1-offset, 0]; #
(31)
> face1:= [flt,frt,krt,klt]; #
(32)
> place1 := [0, 0, 1+offset]; #
(33)
> face3 := [frb,frt,krt,krb]; #
(34)
> place3 := [0, 1+offset, 0]; #
(35)
> face5 := [klt,krt,krb,klb]; #
(36)
> place5 := [-1-offset, 0, 0]; #
(37)
> faces := [polygon(face1), polygon(face2), polygon(face3), polygon
(face4), polygon(face5), polygon(face6)];
(38)
> places := [place1, place2, place3, place4, place5, place6];
(39)
> facecolors := [red, green, "SkyBlue", "Purple", "RosyBrown",
"SlateGray"];
(40)
> stringtable := ["1", "2", "3", "4", "5", "6"];
(41)
> viewr := 1.2;
(42)
> id := [1,2,3,4,5,6];
(43)
>
displaycubework:=proc(plist)
> DisplayCycles := proc(perm)
displaycubework(CyclesToList(perm));
end;
(44)
> DisplayList := proc(plist)
displaycubework(plist); end;
(45)
> DisplayStandardCube := DisplayList(id);
(46)
Stop Ignoring, start reading!
Here is the standard coloring of the cube. You can rotate the cube with your mouse
if you're in Maple.
> DisplayStandardCube;
Display of all the group elements.
The display shows the number in our list of permuations, the disjoint cycle notation
for the permutation, the list notation for the permutation, our standard coloring of
the cube, and the cube that results from applying the
group element.
>
for i from 1 to nops(groupelscycles) do
print(i);
groupelscycles[i];
CyclesToList(groupelscycles[i]);
DisplayStandardCube;
DisplayCycles(groupelscycles[i]);
od;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Download