1. Icosahedron: This graphs the icasohedron. The x[0] through x[11] are the twelve vertices.
  2. restart: with(plots):
    p := arctan(2):           # angle between vertices' layers
    x[0] := [0,0,1]:          # x[-] are vertices
    for i from 0 to 4 do
      x[i+1] := [cos(2*Pi*i/5)*sin(p),sin(2*Pi*i/5)*sin(p),cos(p)]:
      x[i+6] := [-cos(2*Pi*i/5)*sin(p),-sin(2*Pi*i/5)*sin(p),-cos(p)]:
    end do:
    x[11] := [0,0,-1]:
    for i from 0 to 4 do      # loop graphs faces in groups
      a := 0: b := i+1: c := (i+1) mod 5 +1:
      an[i] := polygonplot3d([x[a],x[b],x[c]]):
      a := i+1: b := (i+1) mod 5 +1: c := (i+3) mod 5 +6:
      an[i+5] := polygonplot3d([x[a],x[b],x[c]]):
      a := i+1: b := (i+2) mod 5 +6: c := (i+3) mod 5 +6:
      an[i+10]:=polygonplot3d([x[a],x[b],x[c]]):
      a := i+6: b := (i+1) mod 5 +6: c := 11:
      an[i+15]:=polygonplot3d([x[a],x[b],x[c]]):
    end do:
    an1 := display(an[0],an[1],an[2],an[3],an[4]):
    an2 := display(an[5],an[6],an[7],an[8],an[9]):
    an3 := display(an[10],an[11],an[12],an[13],an[14]):
    an4 := display(an[15],an[16],an[17],an[18],an[19]):
    display(an1,an2,an3,an4,scaling=constrained);
  3. dual1.gifDodecahedron: The below code produces the dodecahedron. To see that the dodecahedron and icosahedron are dual tilings of the sphere, we can produce both simultaneously. To do that, first copy and paste the code for the dodecahedron into MAPLE. Change the last line to read: "an0:=display(an1,an4,an5,an6):" and add another line that reads "unassign('p','q','x','an1','an2','an3','an4','an5','an6'):". Then copy the code for the icosahedron minus the first line (we don't want to restart) and paste it in after the code for the dodecahedron. To the last line, add "an0" to the list of things to display.
  4. restart:with(plots):
    p := arctan(sqrt(150+30*sqrt(5))/30*(sqrt(5)-1),
         sqrt(75+30*sqrt(5))/15):             # vert. angle
    q := arctan(sqrt(150+30*sqrt(5))/15,
         (sqrt(5)-2)*sqrt(75+30*sqrt(5))/15): # mid. angle
    for i from 0 to 4 do                      # the vertices
      x[ i  ] := [-cos(2*Pi*i/5)*sin(p),
                 -sin(2*Pi*i/5)*sin(p),cos(p)]:
      x[i+ 5] := [-cos(2*Pi*i/5)*sin(q),
                 -sin(2*Pi*i/5)*sin(q),cos(q)]:
      x[i+10] := [cos(2*Pi*i/5)*sin(q),
                 sin(2*Pi*i/5)*sin(q),-cos(q)]:
      x[i+15] := [cos(2*Pi*i/5)*sin(p),
                 sin(2*Pi*i/5)*sin(p),-cos(p)]:
    end do:
    an1 := polygonplot3d([x[0],x[1],x[2],x[3],x[4]]):
    an4 := polygonplot3d([x[15],x[16],x[17],x[18],x[19]]):
    for i from 0 to 4 do                      # graphs faces
      an2[i] := polygonplot3d([x[i],x[(i+1)mod 5],
                x[(i+1)mod 5+5],x[(i+3)mod 5+10],x[i+5]]):
      an3[i] := polygonplot3d([x[i+5],x[(i+2)mod 5+10],
                x[(i+2)mod 5+15],x[(i+3)mod 5+15],
                x[(i+3)mod 5 +10]]):
    end do:
    an5 := display(an2[0],an2[1],an2[2],an2[3],an2[4]):
    an6 := display(an3[0],an3[1],an3[2],an3[3],an3[4]):
    display(an1,an4,an5,an6,scaling=constrained);
  5. dual2.gif Octahedron: The code to produce the octahedron.
  6. restart: with(plots):
    x[0] := [0,0,1]:     # vertices
    for i from 0 to 3 do
      x[i+1] := [cos(Pi*i/2),sin(Pi*i/2),0]:
    end do:
    x[5] := [0,0,-1]:
    for i from 0 to 3 do
      a := 0: b := i+1: c := (i+1) mod 4 +1:
      an[i]:=polygonplot3d([x[a],x[b],x[c]]):
      a := i+1: b := (i+1) mod 4 +1: c := 5:
      an[i+4]:=polygonplot3d([x[a],x[b],x[c]]):
    end do:              # faces in 2 groups
    an1 := display(an[0],an[1],an[2],an[3]):
    an2 := display(an[4],an[5],an[6],an[7]):
    display(an1,an2,scaling=constrained);
  7. Hexahedron (Cube): This one produces the cube. To show that the Octahedron and the Cube are dual tilings, we can produce both simultaneously. To do that, first copy and paste the code for the cube into MAPLE. Change the last line to read: "an0:=display(an1,an3,an4):" and add another line that reads "unassign('p','x','an1','an2','an3','an4'):". Then copy the code for the octahedron minus the first line (we don't want to restart) and paste it in after the code for the dodecahedron. To the last line, add "an0" to the list of things to display.
  8. restart:with(plots):
    p := arccos(1/sqrt(3)):
    for i from 0 to 3 do                          # vertices
     x[ i ] := [cos((2*i+1)*Pi/4)*sin(p),
               sin((2*i+1)*Pi/4)*sin(p),cos(p)]:
     x[i+4] := [cos((2*i+1)*Pi/4)*sin(p),
               sin((2*i+1)*Pi/4)*sin(p),-cos(p)]:
    end do:
    an1 := polygonplot3d([x[0],x[1],x[2],x[3]]):  # top face
    an3 := polygonplot3d([x[4],x[5],x[6],x[7]]):  # bottom face
    for i from 0 to 3 do                          # side faces
      an2[i] := polygonplot3d([x[i],x[(i+1)mod 4],
                x[(i+1)mod 4+4],x[(i)mod 4+4]]):
    end do:
    an4 := display(an2[0],an2[1],an2[2],an2[3]):
    display(an1,an3,an4,scaling=constrained);
  9. Tetrahedron: This one produces the tetrahedron.
  10. restart: with(plots):
    p := -arctan(2*sqrt(2))+Pi:
    x[0][0] := [0,0,1]:           # x[0][-] are vertices
    x[0][1] := [sin(p),0,cos(p)]:
    x[0][2] := [cos(2*Pi/3)*sin(p),sin(2*Pi/3)*sin(p),cos(p)]:
    x[0][3] := [cos(4*Pi/3)*sin(p),sin(4*Pi/3)*sin(p),cos(p)]:
    for i from 0 to 2 do          # 3 side faces
      a := 0: b := i+1: c := (i+1) mod 3 +1:
      an1[i] := polygonplot3d([x[0][a],x[0][b],x[0][c]]):
    end do:
    a := 1: b := 2: c := 3:       # bottom face
    an1[3] := polygonplot3d([x[0][a],x[0][b],x[0][c]]):
    display(an1[0],an1[1],an1[2],an1[3],scaling=constrained);
    To demonstrate that the tetrahedron is self-dual, we can change the code as follows. First, change the final line of the code to read "an0:=display(an1[0],an1[1],an1[2],an1[3]):". Then add the following lines.
    for i from 0 to 3 do          # x[1][-] are antipode vertices
      x[1][i] := -1*x[0][i]:
    end do:
    for i from 0 to 2 do          # 3 side faces
      a := 0: b := i+1: c := (i+1) mod 3 +1:
      an1[i] := polygonplot3d([x[1][a],x[1][b],x[1][c]]):
    end do:
    a := 1: b := 2: c := 3:       # bottom face
    an1[3] := polygonplot3d([x[1][a],x[1][b],x[1][c]]):
    display(an0,an1[0],an1[1],an1[2],an1[3],scaling=constrained);
    To demonstrate the relationship between the doubled tetrahedron and the cube, we can change the last line of the above added code to read "an2:=display(an0,an1[0],an1[1],an1[2],an1[3]):", and add the following lines.
    for i from 0 to 1 do
      an3[ i ] := polygonplot3d([x[i][0],x[(i+1)mod 2][1],
                  x[i][2],x[(i+1)mod 2][3]]):
      an3[i+2] := polygonplot3d([x[i][0],x[(i+1)mod 2][2],
                  x[i][1],x[(i+1)mod 2][3]]):
      an3[i+4] := polygonplot3d([x[i][0],x[(i+1)mod 2][2],
                  x[i][3],x[(i+1)mod 2][1]]):
    end do:    # tetrahedral vertices -> cube vertices
    display(an2,an3[0],an3[1],an3[2],an3[3],an3[4],an3[5],
                  scaling=constrained);
    The relationship might be easier to understand if one of the an[i] is eliminated from the final display, for example, try eliminating "an3[0]," from the last statement if you do not see the relationship.