# # Plot hyperplanes (including affine translates) of any 2-D or 3-D # Coxeter arrangement. Requires the coxeter package. # Modified for Maple VR4 6/29/98. with(coxeter): # choose an orthonormal basis for root system R ONbasis:=proc(R) local S,v,r,b,i; S:=base(R); b:=[]; S:=[interior_pt(S),op(1..nops(S)-1,S)]; for r in S do v:=r-convert([seq(iprod(r,v)*v,v=b)],`+`); b:=[op(b),evalf(v/sqrt(iprod(v,v)))]; od; [seq(b[-i],i=-nops(b)..-1)]; end; # For each positive root r, generate the defining equations for # the i-th hyperplane perpendicular to r, i = . hyps:=proc(R,Range) local pr,b,i,v,r,vars; pr:=pos_roots(R); b:=ONbasis(R); if nops(b)=1 then vars:=[x] elif nops(b)=2 then vars:=[x,y] elif nops(b)=3 then vars:=[x,y,z] else vars:=x fi; v:=convert([seq(vars[i]*b[i],i=1..nops(b))],`+`); v:=collect(v,indets(b)); {seq(seq(iprod(r,v)=i,i=Range),r=pr)}; end; # plothyps(R,a..b,box) plots all hyperplanes of the form =i, where # r ranges over all positive roots and i = a..b. The third argument # restricts the plot to the square or cube whose coordinates range # over [-box,box]. If the third argument is omitted, a guess is made. plothyps:=proc(R,Range) local bd,col; bd:=2*(op(2,Range)-op(1,Range))+1; if nargs>2 then bd:=args[3] fi; if rank(R)=2 then if `+`(0)=0 then col:='black' else col:='white' fi; plot(map(solve,hyps(R,Range),y),x=-bd..bd,y=-bd..bd, axes=NONE,title=convert(R,'string'),scaling=CONSTRAINED,color=col); elif rank(R)=3 then plot3d(map(solve,hyps(R,Range),z),x=-bd..bd,y=-bd..bd, axes=NONE,title=convert(R,'string'),scaling=CONSTRAINED,view=-bd..bd); fi end; # Examples (remember to 'with(coxeter)'): # # The (irreducible) Coxeter arrangements of rank 3: # # plothyps(A3,0..0); # plothyps(B3,0..0); # plothyps(H3,0..0); # # The sandwich arrangements # # plothyps(A2,0..1); # plothyps(B2,0..1); # plothyps(G2,0..1); # plothyps(I2[5],0..1,4); # # plothyps(A3,0..1,2); # plothyps(B3,0..1,3); # plothyps(C3,0..1,3); # # Handy graph paper for exploring the rank 2 affine groups. # # plotsetup(ps,plotoptions=`portrait,noborder`); # plothyps(A2,-11..11,6); # plothyps(B2,-10..10,6); # plothyps(G2,-13..13,4);