{VERSION 5 0 "IBM INTEL LINUX" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 " " 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 39 "Restart Map le and clear any definitions" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "rest art:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 21 "Load plott ing package" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }} {PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been r edefined\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 50 "Proc edure for a regular polygon with side length 1" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 258 "regular1:=proc(n,theta)\n local a, b, i, poly, r; \n a:=2*Pi/n;\n b:=theta*Pi/180;\n r:=1/(2*sin(a/2));\n poly:= [[r*cos(b),r*sin(b)]];\n for i from 1 to n-1 do\n b:=b+a;\n \+ poly:=[op(poly), [r*cos(b),r*sin(b)]];\n end:\n RETURN(poly); \nend: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 16 "The m ain hexagon" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "hex:=regular1(6,30): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 66 "The distance b etween centers of neighboring hexagons in the tiling" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "r:=cot(Pi/6):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "evalf(r);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+330K< !\"*" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 52 "These are \+ the translations that generate our tiling." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "T:=x->[x[1]+r,x[2]]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Tinv:= x->[x[1]-r,x[2]]:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 42 "S:=x->[x[1]+r*cos(Pi/3),x[2]+r*sin(Pi/3)]:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "Sinv:=x->[x[1]-r*cos(Pi/3),x [2]-r*sin(Pi/3)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "R:=x-> [cos(Pi/3)*x[1]-sin(Pi/3)*x[2],sin(Pi/3)*x[1]+cos(Pi/3)*x[2]]:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "Rinv:=x->[cos(-Pi/3)*x[1]-si n(-Pi/3)*x[2],sin(-Pi/3)*x[1]+cos(-Pi/3)*x[2]]:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 66 "This procedure applies all powers \+ T1^i T2^j for i from 0 to n" }}{PARA 0 "" 0 "" {TEXT -1 42 " and j \+ from 0 to m to the polygon poly." }}{PARA 0 "" 0 "" {TEXT -1 52 "Opt ional plotting arguments can be added at the end." }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 360 "tiles:=proc(n,m,T1,T2,poly)\n if nargs > 5 then \n map( polygonplot, \n [seq( \n seq( evalf( map( ( T1@@i)@(T2@@j) , poly ) ),\n j=0..m),\n i=0..n) ] ,\n \+ args[6..nargs]);\n else\n map( polygonplot, \n [seq ( \n seq( evalf( map( (T1@@i)@(T2@@j) , poly ) ),\n \+ j=0..m),\n i=0..n) ] );\n end:\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT -1 33 "Store a plot in a named variable." }} {PARA 0 "" 0 "" {TEXT -1 72 "Be sure to put a : at the end so that all the raw data is not displayed." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 173 "hexes:=display(tiles(10,10,T,S,\n map( (Tinv@@5)@(Sinv@@5), hex) \+ ),\n thickness=3,\n style=line,\n axes=none,\n view=[- 6..6,-6..6],\n scaling=CONSTRAINED):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "display(hexes);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 117 "display( \{hexes,\n polygonplot(hex,color=r ed),\n polygonplot(map(T@R,hex),color=green) \n \} ); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "triangle:=map(x->[x[1]+ cot(Pi/3),x[2]], regular1(3,60)):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 148 "display( \{hexes,\n polygonplot(triangle,co lor=red,thickness=3),\n polygonplot(map(R,triangle),color=blu e,thickness=3) \n \} );" }}}}{MARK "0 1 0" 8 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }