#include "colors.inc" #include "textures.inc" // the glass texture for the tetracadidecahedra shapes #declare glass = texture { pigment { color White filter 0.7 } finish { specular 1 roughness 0.02 reflection .2 ior 2.2 } } // the vertices for the tetracadidecahedron #declare VERTICES = array[24][3] { { 2, 0, 3 }, { 3, 0, 2 }, { 2, 0, 1 }, { 1, 0, 2 }, { 2, 1, 4 }, { 4, 1, 2 }, { 2, 1, 0 }, { 0, 1, 2 }, { 3, 2, 4 }, { 4, 2, 3 }, { 4, 2, 1 }, { 3, 2, 0 }, { 1, 2, 0 }, { 0, 2, 1 }, { 0, 2, 3 }, { 1, 2, 4 }, { 2, 3, 4 }, { 4, 3, 2 }, { 2, 3, 0 }, { 0, 3, 2 }, { 2, 4, 3 }, { 3, 4, 2 }, { 2, 4, 1 }, { 1, 4, 2 }, } // all faces, described as indices into the VERTICES array // (-1 is no point for the squares) #declare FACES = array[14][7] { { 0, 3, 2, 1, 0, -1, -1 }, { 0, 1, 5, 9, 8, 4, 0 }, { 1, 2, 6, 11, 10, 5, 1 }, { 2, 3, 7, 13, 12, 6, 2 }, { 0, 4, 15, 14, 7, 3, 0 }, { 4, 8, 16, 15, 4, -1, -1 }, { 5, 10, 17, 9, 5, -1, -1 }, { 6, 12, 18, 11, 6, -1, -1 }, { 7, 14, 19, 13, 7, -1, -1 }, { 8, 9, 17, 21, 20, 16, 8 }, { 10, 11, 18, 22, 21, 17, 10 }, { 12, 13, 19, 23, 22, 18, 12 }, { 14, 15, 16, 20, 23, 19, 14 }, { 20, 21, 22, 23, 20, -1, -1 } } // one Tetracaidecahedron #declare Tetracaidecahedron = union { #declare V = array [7]; #declare i = 0; #while (i < 14) #declare v0index = FACES[i][0]; #declare v0 = * 20; #declare j = 1; #declare c = 0; #while (j < 7) #declare v1index = FACES[i][j]; #if (v1index >= 0) #declare v1 = * 20; merge { cylinder { v0, v1, 2 } sphere { v0, 2 } sphere { v1, 2 } texture { Polished_Chrome } } #declare V[c] = v1; #declare c = c + 1; #declare v0 = v1; #end #declare j = j + 1; #end #if (c = 4) polygon { 5, V[0], V[1], V[2], V[3], V[0] texture { glass } } #end #if (c = 6) polygon { 7, V[0], V[1], V[2], V[3], V[4], V[5], V[0] texture { glass } } #end #declare i = i + 1; #end } // // the scene // // a nice cloudy sky sky_sphere { pigment { granite turbulence 0.2 color_map { [ 0, .3 color Blue color Blue ] [.3, 1 color Blue color White ] } } } // a mysterious plane plane { <0, 1, 0>, -10 texture { Jade scale 100 } } // first level object { Tetracaidecahedron translate <0, 0, 0> } object { Tetracaidecahedron translate <-100, 0, 0> } object { Tetracaidecahedron translate <-100, 0, 100> } object { Tetracaidecahedron translate <0, 0, 100> } object { Tetracaidecahedron translate <-200, 0, 0> } object { Tetracaidecahedron translate <-200, 0, 100> } object { Tetracaidecahedron translate <-200, 0, 200> } object { Tetracaidecahedron translate <-100, 0, 200> } object { Tetracaidecahedron translate <0, 0, 200> } // second level object { Tetracaidecahedron translate <-50, 80, 50> } object { Tetracaidecahedron translate <-150, 80, 50> } object { Tetracaidecahedron translate <-50, 80, 150> } object { Tetracaidecahedron translate <-150, 80, 150> } // illuminate it light_source { <-1250, 2220, 400> colour White } // show it from diagonal above camera { location <100, 400, 400> look_at <-40, 40, 150> }