Subgroup Lattice Plotting in 3 dimensions
by Michael Monagan
Abstract:
Worksheet with program displaying a subgroup lattice in three dimensions.
Application Areas/Subjects:
Plotting, Programming, Group Theory
Keywords:
Subgroup, lattice, plot, visualize,
>
restart:
Introduction
This routine is intended to show how one can program one's own plotting routines using the PLOT3D structure in Maple. The main help file for this is ?plot3d,structure. The example we have chosen is to plot a subgroup lattice in 3-dimensions. But this code can serve as an example for how to plot an arbitrary graph G = V,E
>
The Subgroup Lattice
The lattice is a graph (V,E) input as follows:
V:list(list(list(integer)))
E:list(integer={integer,set(integer),list(integer)})
The vertices V are input in a predetermined spacial arrangement as a layers (or planes) of rows of vertices. This is list of planes where each plane is a list of rows and each row is a list of vertices and each vertex is just an integer. So that means V is a list of lists of lists of integers. The output will place the vertices in the order described by V. This will become clear (hopefully) when you look at the pictures.
The edges E are input as an adjacency list, namely a list of equations where the left hand side is the vertex (an integer), and the right hand side is the adjacent vertices, specified by either a single integer, or a list or set of integers.
The output is a PLOT3D structure corresponding to the lattice. Vertices are drawn as points and edges as lines. The points in the PLOT3D data structure are just output as
POINTS( [v1, v2, ..., vn] )
and the edges v2,v3,...,vm adjacent to vertex v1 are put together to form a curve as
CURVELIST([v1,v2,v1,v3,...,v1,vm]).
Here is the program which converts the (V,E) representation of the lattice into a PLOT3D data structure.
>
sglplot := proc( V::list(list(list(integer))),
E::list(integer={integer,list(integer),set(integer)}) )
local i,j,k, x,y,z, l,m,n, C,P,xyz, e,s,t, X,Y,Z, l1,l2;
l := nops(V);
for i to l do
l1 := V[i];
m := nops(l1);
for j to m do
l2 := l1[j];
n := nops(l2);
for k to n do
x := i + (k+1)/(n+3) - 1/2;
y := i/2 - j/(m+1) + 1/2;
z := i - 1/2;
xyz[l2[k]] := [z,x,y];
od
od
od;
P := POINTS( map(op,[entries(xyz)]) );
n := nops(E);
for i to n do
s := lhs(E[i]);
t := NULL;
e := rhs(E[i]);
if type(e,numeric) then t := xyz[s], xyz[e]
else for e in rhs(E[i]) do t:=t, xyz[s], xyz[e], xyz[s] od
fi;
C[i] := CURVELIST( [t] );
od;
C := seq( C[i], i=1..n );
PLOT3D( P, C,
STYLE(WIREFRAME), LABELS([X,Y,Z]), AXES(FRAME),
ORIENTATION(5,80), VIEW(1/3..l-1/3,1/2..l+1/2,0..(l+1)/2 ) )
end:
Here is the first subgroup lattice
>
Group.44.43 :=
# The vertex adjacencies
[ [ [46,47,48],
[38,39,40,33,35,36,37],
[17,18,19,16,20,21,15,23,24,25,26,27,28],
[$1..13],
[0] ],
[ [51],
[50,45,49],
[44,43,34,41,42],
[22,29,30,31,32],
[14] ]
],
# The edge adjacencies E
[
51={50,45,49,46,47,48},
44={17,18,19,50,43,22},
43={16,20,21,50,22},
34={15,50,45,49,22},
41={23,24,25,29,42,49,30,22},
42={26,27,28,49,32,31,22},
46=47, 47=48,
29=30, 30=31, 31=32,
14={22,29,30,31,32,0},
38={46,17,16,15,50},
39={38,40,47,18,20,15,50},
40={48,19,21,15,50},
33={46,47,48,15,45},
35={46,15,23,26,49},
36={35,37,47,15,24,27,49},
37={48,15,25,28,49},
17=18, 18=19, 19=16, 16=20, 20=21,
23=24, 24=25, 25=26, 26=27, 27=28,
1={0,17,18,19,16,20,21,15,$23..28},
2={0,23,29,3}, 3={0,24,29,4}, 4={0,25,29,5},
5={0,23,30,6}, 6={0,24,30,7}, 7={0,25,30,8},
8={0,26,31,9}, 9={0,27,31,10}, 10={0,28,31,11},
11={0,26,32,12}, 12={0,27,32,13}, 13={0,28,32}
]:
Here is the next subgroup lattice
>
Group.48.44 :=
# The vertex planes
[ [ [30,31,32],
[19,20,21,17,22,23,24],
[$4..9,3,10,14,15,11,12,13],
[1],
[0] ],
[ [35],
[33,29,34],
[25,26,18,27,28],
[16],
[2] ]
],
# The edge adjacecies
[
35={30,31,32,33,29,34},
25={4,5,6,33,26,16},
26={7,8,9,33,16},
18={3,33,29,34,16},
27={10,14,15,34,16,28},
28={11,12,13,34,16},
30=31,31=32,
2={16,0},
19={20,30,33,4,7,3},
20={31,33,5,8,3},
21={20,32,33,6,9,3},
17={30,31,32,29,3},
22={30,23,34,3,10,11},
23={31,34,3,14,12},
24={32,23,34,3,15,13},
1={16,0,$3..15},
4=5,5=6,6=7,7=8,8=9,
10=14,14=15,15=11,11=12,12=13
]:
>
sglplot( Group.44.43 );
>
sglplot( Group.48.44 );
>
>