// uses Jean-Charles Marteau's menger routines #version 3.5; #declare rseed = seed(35758928); #declare rubble_seed = seed(14123756); #declare line_seed = seed(97646237); #declare pic_aspect = image_width / image_height; global_settings { assumed_gamma 2.2 noise_generator 1 } fog { fog_type 2 fog_offset 0 fog_alt 1 distance 100 } #macro camera_transforms() rotate x*-12 rotate y*23 translate <-3.7, 0.8, -6.8> #end #macro overlay_transforms() translate <0, 0, 1> camera_transforms() #end camera { location 0 direction <0, 0, 1> right <(image_width / image_height), 0, 0> up <0, 1, 0> camera_transforms() } sky_sphere { pigment { // space clouds, sorta bozo color_map { [ 0.5 color rgb 0 ] [ 1.0 color rgb 0.2 + 0.2 * <0, 0.3, 1> ] } translate <-3, 4, 15> rotate <11, 3.9, -2> } pigment { // stars granite color_map { [ 0.85 color rgbt 1 ] [ 0.85 color rgb 1 ] } scale 0.006 translate <-31, 9, 2.3> } pigment { // more stars granite color_map { [ 0.85 color rgbt 1 ] [ 0.85 color rgb 1 ] } scale 0.006 translate <8.7, 3, 2.1> } } #macro do_quad(p1, p2, p3, p4) triangle { p1, p2, p3 } triangle { p1, p3, p4 } #end #macro rubble_rnd(n) #local rr = int(rand(rubble_seed) * n); #local dummy = rand(rubble_seed); rr #end #macro rubble_rrand(lo, hi) #local rlo = min(lo, hi); #local rhi = max(lo, hi); #local rr = rlo + (rand(rubble_seed) * (rhi - rlo)); #local dummy = rand(rubble_seed); rr #end #declare diag = sqrt(0.5); #declare sqrt3 = sqrt(3); #declare kevmed = mesh { // version without uv-mapping // top left rear slope triangle { <-0.5, 0.5, 0.5 + diag>, <-0.5, 0.5 + diag, 0.5>, <-0.5 - diag, 0.5, 0.5> } // left rear slope triangle { <-0.5, 0.5, 0.5 + diag>, <-0.5 - diag, 0.5, 0.5>, <-0.5 - diag, -0.5, 0.5> } triangle { <-0.5, 0.5, 0.5 + diag>, <-0.5 - diag, -0.5, 0.5>, <-0.5, -0.5, 0.5 + diag> } // left bottom rear slope triangle { <-0.5, -0.5, 0.5 + diag>, <-0.5 - diag, -0.5, 0.5>, <-0.5, -0.5 - diag, 0.5> } // top left slope triangle { <-0.5, 0.5 + diag, 0.5>, <-0.5, 0.5 + diag, -0.5>, <-0.5 - diag, 0.5, -0.5> } triangle { <-0.5, 0.5 + diag, 0.5>, <-0.5 - diag, 0.5, -0.5>, <-0.5 - diag, 0.5, 0.5> } // left face triangle { <-0.5 - diag, 0.5, 0.5>, <-0.5 - diag, 0.5, -0.5>, <-0.5 - diag, -0.5, -0.5> } triangle { <-0.5 - diag, 0.5, 0.5>, <-0.5 - diag, -0.5, -0.5>, <-0.5 - diag, -0.5, 0.5> } // bottom left slope triangle { <-0.5 - diag, -0.5, 0.5>, <-0.5 - diag, -0.5, -0.5>, <-0.5, -0.5 - diag, -0.5> } triangle { <-0.5 - diag, -0.5, 0.5>, <-0.5, -0.5 - diag, -0.5>, <-0.5, -0.5 - diag, 0.5> } // top front left slope triangle { <-0.5 - diag, 0.5, -0.5>, <-0.5, 0.5 + diag, -0.5>, <-0.5, 0.5, -0.5 - diag> } // left side slope triangle { <-0.5 - diag, 0.5, -0.5>, <-0.5, 0.5, -0.5 - diag>, <-0.5, -0.5, -0.5 - diag> } triangle { <-0.5 - diag, 0.5, -0.5>, <-0.5, -0.5, -0.5 - diag>, <-0.5 - diag, -0.5, -0.5> } // top front slope face triangle { <-0.5, 0.5 + diag, -0.5>, <0.5, 0.5 + diag, -0.5>, <0.5, 0.5, -0.5 - diag> } triangle { <-0.5, 0.5 + diag, -0.5>, <0.5, 0.5, -0.5 - diag>, <-0.5, 0.5, -0.5 - diag> } // right upper front slope triangle { <0.5, 0.5, -0.5 - diag>, <0.5, 0.5 + diag, -0.5>, <0.5 + diag, 0.5, -0.5> } // front face triangle { <-0.5, 0.5, -0.5 - diag>, <0.5, 0.5, -0.5 - diag>, <0.5, -0.5, -0.5 - diag> } triangle { <-0.5, 0.5, -0.5 - diag>, <0.5, -0.5, -0.5 - diag>, <-0.5, -0.5, -0.5 - diag> } // right front slope triangle { <0.5, 0.5, -0.5 - diag>, <0.5 + diag, 0.5, -0.5>, <0.5 + diag, -0.5, -0.5> } triangle { <0.5, 0.5, -0.5 - diag>, <0.5 + diag, -0.5, -0.5>, <0.5, -0.5, -0.5 - diag> } // bottom front left slope triangle { <-0.5 - diag, -0.5, -0.5>, <-0.5, -0.5, -0.5 - diag>, <-0.5, -0.5 - diag, -0.5> } // bottom front slope triangle { <-0.5, -0.5, -0.5 - diag>, <0.5, -0.5, -0.5 - diag>, <0.5, -0.5 - diag, -0.5> } triangle { <-0.5, -0.5, -0.5 - diag>, <0.5, -0.5 - diag, -0.5>, <-0.5, -0.5 - diag, -0.5> } // bottom right front slope triangle { <0.5, -0.5, -0.5 - diag>, <0.5 + diag, -0.5, -0.5>, <0.5, -0.5 - diag, -0.5> } // upper right slope triangle { <0.5, 0.5 + diag, -0.5>, <0.5, 0.5 + diag, 0.5>, <0.5 + diag, 0.5, 0.5> } triangle { <0.5, 0.5 + diag, -0.5>, <0.5 + diag, 0.5, 0.5>, <0.5 + diag, 0.5, -0.5> } // right face triangle { <0.5 + diag, 0.5, -0.5>, <0.5 + diag, 0.5, 0.5>, <0.5 + diag, -0.5, 0.5> } triangle { <0.5 + diag, 0.5, -0.5>, <0.5 + diag, -0.5, 0.5>, <0.5 + diag, -0.5, -0.5> } // bottom right triangle { <0.5 + diag, -0.5, -0.5>, <0.5 + diag, -0.5, 0.5>, <0.5, -0.5 - diag, 0.5> } triangle { <0.5 + diag, -0.5, -0.5>, <0.5, -0.5 - diag, 0.5>, <0.5, -0.5 - diag, -0.5> } // upper right rear triangle { <0.5 + diag, 0.5, 0.5>, <0.5, 0.5 + diag, 0.5>, <0.5, 0.5, 0.5 + diag> } // rear right triangle { <0.5 + diag, 0.5, 0.5>, <0.5, 0.5, 0.5 + diag>, <0.5, -0.5, 0.5 + diag> } triangle { <0.5 + diag, 0.5, 0.5>, <0.5, -0.5, 0.5 + diag>, <0.5 + diag, -0.5, 0.5> } // bottom right rear triangle { <0.5 + diag, -0.5, 0.5>, <0.5, -0.5, 0.5 + diag>, <0.5, -0.5 - diag, 0.5> } // top rear triangle { <0.5, 0.5 + diag, 0.5>, <-0.5, 0.5 + diag, 0.5>, <-0.5, 0.5, 0.5 + diag> } triangle { <0.5, 0.5 + diag, 0.5>, <-0.5, 0.5, 0.5 + diag>, <0.5, 0.5, 0.5 + diag> } // rear face triangle { <0.5, 0.5, 0.5 + diag>, <-0.5, 0.5, 0.5 + diag>, <-0.5, -0.5, 0.5 + diag> } triangle { <0.5, 0.5, 0.5 + diag>, <-0.5, -0.5, 0.5 + diag>, <0.5, -0.5, 0.5 + diag> } // bottom rear triangle { <0.5, -0.5, 0.5 + diag>, <-0.5, -0.5, 0.5 + diag>, <-0.5, -0.5 - diag, 0.5> } triangle { <0.5, -0.5, 0.5 + diag>, <-0.5, -0.5 - diag, 0.5>, <0.5, -0.5 - diag, 0.5> } // bottom triangle { <-0.5, -0.5 - diag, -0.5>, <0.5, -0.5 - diag, -0.5>, <0.5, -0.5 - diag, 0.5> } triangle { <-0.5, -0.5 - diag, -0.5>, <0.5, -0.5 - diag, 0.5>, <-0.5, -0.5 - diag, 0.5> } // top triangle { <-0.5, 0.5 + diag, 0.5>, <0.5, 0.5 + diag, 0.5>, <0.5, 0.5 + diag, -0.5> } triangle { <-0.5, 0.5 + diag, 0.5>, <0.5, 0.5 + diag, -0.5>, <-0.5, 0.5 + diag, -0.5> } } #declare bar_p = pigment { color rgb 0.6 } #declare solid_p = pigment { color rgb 1 } plane { // floor <0, 1, 0>, 0 pigment { color rgb 1 } normal { average normal_map { [ 1 ripples frequency 70 bump_size 0.3 scale 31 translate <0.3 0.5, 0.4> rotate <9, 3.1, 7.3> ] [ 1 bozo bump_size 0.3 translate <41, 5.1, -16> rotate <19.4, 9.9, -14> scale 0.2 ] } } finish { ambient 0 diffuse 1 } } #declare dar = texture { pigment { color rgb <0.2, 1, 0> } finish { ambient 0.1 diffuse 0.9 specular 1 roughness 0.03 } } #declare simple_greeb_cube = mesh2 { vertex_vectors { 312, <-0.792400,0.792400,1.00000>, <-0.792400,-0.792400,1.00000>, <0.792400,-0.792400,1.00000>,<0.792400,0.792400,1.00000>,<-1.00000,-0.792400,0.792400>,<-1.00000,0.792400,0.792400>,<-1.00000,0.792400,-0.792400>,<-1.00000,-0.792400,-0.792400>,<-0.792400,1.00000,0.792400>,<0.792400,1.00000,0.792400>,<0.792400,1.00000,-0.792400>,<-0.792400,1.00000,-0.792400>,<-0.792400,-0.792400,-1.00000>,<-0.792400,0.792400,-1.00000>,<0.792400,0.792400,-1.00000>,<0.792400,-0.792400,-1.00000>,<1.00000,0.792400,0.792400>,<1.00000,-0.792400,0.792400>,<1.00000,-0.792400,-0.792400>,<1.00000,0.792400,-0.792400>,<0.792400,-1.00000,0.792400>,<-0.792400,-1.00000,0.792400>,<-0.792400,-1.00000,-0.792400>,<0.792400,-1.00000,-0.792400>,<-0.640259,0.640259,1.00000>,<-0.640259,-0.640259,1.00000>,<0.640259,-0.640259,1.00000>,<0.640259,0.640259,1.00000>,<1.00000,0.640259,0.640259>,<1.00000,-0.640259,0.640259>,<1.00000,-0.640259,-0.640259>,<1.00000,0.640259,-0.640259>,<0.640259,-1.00000,0.640259>,<-0.640259,-1.00000,0.640259>,<-0.640259,-1.00000,-0.640259>,<0.640259,-1.00000,-0.640259>,<-0.640259,1.00000,0.640259>,<0.640259,1.00000,0.640259>,<0.640259,1.00000,-0.640259>,<-0.640259,1.00000,-0.640259>,<-0.640259,-0.640259,-1.00000>,<-0.640259,0.640259,-1.00000>,<0.640259,0.640259,-1.00000>,<0.640259,-0.640259,-1.00000>,<-1.00000,-0.640259,0.640259>,<-1.00000,0.640259,0.640259>,<-1.00000,0.640259,-0.640259>,<-1.00000,-0.640259,-0.640259>,<-0.583916,0.583916,0.954000>,<-0.583916,-0.583916,0.954000>,<0.583916,-0.583916,0.954000>,<0.583916,0.583916,0.954000>,<0.954000,0.583916,0.583916>,<0.954000,-0.583916,0.583916>,<0.954000,-0.583916,-0.583916>,<0.954000,0.583916,-0.583916>,<0.583916,-0.954000,0.583916>,<-0.583916,-0.954000,0.583916>,<-0.583916,-0.954000,-0.583916>,<0.583916,-0.954000,-0.583916>,<-0.583916,0.954000,0.583916>,<0.583916,0.954000,0.583916>,<0.583916,0.954000,-0.583916>,<-0.583916,0.954000,-0.583916>,<-0.583916,-0.583916,-0.954000>,<-0.583916,0.583916,-0.954000>,<0.583916,0.583916,-0.954000>,<0.583916,-0.583916,-0.954000>,<-0.954000,-0.583916,0.583916>,<-0.954000,0.583916,0.583916>,<-0.954000,0.583916,-0.583916>,<-0.954000,-0.583916,-0.583916>,<-0.443776,0.443776,0.954000>,<-0.443776,-0.443776,0.954000>,<0.443776,-0.443776,0.954000>,<0.443776,0.443776,0.954000>,<0.954000,0.443776,0.443776>,<0.954000,-0.443776,0.443776>,<0.954000,-0.443776,-0.443776>,<0.954000,0.443776,-0.443776>,<0.443776,-0.954000,0.443776>,<-0.443776,-0.954000,0.443776>,<-0.443776,-0.954000,-0.443776>,<0.443776,-0.954000,-0.443776>,<-0.443776,0.954000,0.443776>,<0.443776,0.954000,0.443776>,<0.443776,0.954000,-0.443776>,<-0.443776,0.954000,-0.443776>,<-0.443776,-0.443776,-0.954000>,<-0.443776,0.443776,-0.954000>,<0.443776,0.443776,-0.954000>,<0.443776,-0.443776,-0.954000>,<-0.954000,-0.443776,0.443776>,<-0.954000,0.443776,0.443776>,<-0.954000,0.443776,-0.443776>,<-0.954000,-0.443776,-0.443776>,<-0.443776,0.443776,0.996000>,<-0.443776,-0.443776,0.996000>,<0.443776,-0.443776,0.996000>,<0.443776,0.443776,0.996000>,<0.996000,0.443776,0.443776>,<0.996000,-0.443776,0.443776>,<0.996000,-0.443776,-0.443776>,<0.996000,0.443776,-0.443776>,<0.443776,-0.996000,0.443776>,<-0.443776,-0.996000,0.443776>,<-0.443776,-0.996000,-0.443776>,<0.443776,-0.996000,-0.443776>,<-0.443776,0.996000,0.443776>,<0.443776,0.996000,0.443776>,<0.443776,0.996000,-0.443776>,<-0.443776,0.996000,-0.443776>,<-0.443776,-0.443776,-0.996000>,<-0.443776,0.443776,-0.996000>,<0.443776,0.443776,-0.996000>,<0.443776,-0.443776,-0.996000>,<-0.996000,-0.443776,0.443776>,<-0.996000,0.443776,0.443776>,<-0.996000,0.443776,-0.443776>,<-0.996000,-0.443776,-0.443776>,<-0.329282,0.329282,0.996000>,<-0.329282,-0.329282,0.996000>,<0.329282,-0.329282,0.996000>,<0.329282,0.329282,0.996000>,<0.996000,0.329282,0.329282>,<0.996000,-0.329282,0.329282>,<0.996000,-0.329282,-0.329282>,<0.996000,0.329282,-0.329282>,<0.329282,-0.996000,0.329282>,<-0.329282,-0.996000,0.329282>,<-0.329282,-0.996000,-0.329282>,<0.329282,-0.996000,-0.329282>,<-0.329282,0.996000,0.329282>,<0.329282,0.996000,0.329282>,<0.329282,0.996000,-0.329282>,<-0.329282,0.996000,-0.329282>,<-0.329282,-0.329282,-0.996000>,<-0.329282,0.329282,-0.996000>,<0.329282,0.329282,-0.996000>,<0.329282,-0.329282,-0.996000>,<-0.996000,-0.329282,0.329282>,<-0.996000,0.329282,0.329282>,<-0.996000,0.329282,-0.329282>,<-0.996000,-0.329282,-0.329282>,<-0.329282,0.329282,0.866000>,<-0.329282,-0.329282,0.866000>,<0.329282,-0.329282,0.866000>,<0.329282,0.329282,0.866000>,<0.866000,0.329282,0.329282>,<0.866000,-0.329282,0.329282>,<0.866000,-0.329282,-0.329282>,<0.866000,0.329282,-0.329282>,<0.329282,-0.866000,0.329282>,<-0.329282,-0.866000,0.329282>,<-0.329282,-0.866000,-0.329282>,<0.329282,-0.866000,-0.329282>,<-0.329282,0.866000,0.329282>,<0.329282,0.866000,0.329282>,<0.329282,0.866000,-0.329282>,<-0.329282,0.866000,-0.329282>,<-0.329282,-0.329282,-0.866000>,<-0.329282,0.329282,-0.866000>,<0.329282,0.329282,-0.866000>,<0.329282,-0.329282,-0.866000>,<-0.866000,-0.329282,0.329282>,<-0.866000,0.329282,0.329282>,<-0.866000,0.329282,-0.329282>,<-0.866000,-0.329282,-0.329282>,<0.720470,-0.949138,0.843262>,<0.720470,-0.843262,0.949138>,<-0.720470,-0.843262,0.949138>,<-0.720470,-0.949138,0.843262>,<-0.843262,0.949138,-0.720470>,<-0.949138,0.843262,-0.720470>,<-0.949138,0.843262,0.720470>,<-0.843262,0.949138,0.720470>,<-0.843262,0.720470,0.949138>,<-0.949138,0.720470,0.843262>,<-0.949138,-0.720470,0.843262>,<-0.843262,-0.720470,0.949138>,<0.949138,0.843262,-0.720470>,<0.843262,0.949138,-0.720470>,<0.843262,0.949138,0.720470>,<0.949138,0.843262,0.720470>,<0.720470,0.843262,0.949138>,<0.720470,0.949138,0.843262>,<-0.720470,0.949138,0.843262>,<-0.720470,0.843262,0.949138>,<0.843262,-0.949138,-0.720470>,<0.949138,-0.843262,-0.720470>,<0.949138,-0.843262,0.720470>,<0.843262,-0.949138,0.720470>,<0.843262,-0.720470,0.949138>,<0.949138,-0.720470,0.843262>,<0.949138,0.720470,0.843262>,<0.843262,0.720470,0.949138>,<-0.949138,-0.843262,-0.720470>,<-0.843262,-0.949138,-0.720470>,<-0.843262,-0.949138,0.720470>,<-0.949138,-0.843262,0.720470>,<-0.949138,0.720470,-0.843262>,<-0.843262,0.720470,-0.949138>,<-0.843262,-0.720470,-0.949138>,<-0.949138,-0.720470,-0.843262>,<0.949138,-0.720470,-0.843262>,<0.843262,-0.720470,-0.949138>,<0.843262,0.720470,-0.949138>,<0.949138,0.720470,-0.843262>,<0.720470,0.949138,-0.843262>,<0.720470,0.843262,-0.949138>,<-0.720470,0.843262,-0.949138>,<-0.720470,0.949138,-0.843262>,<0.720470,-0.843262,-0.949138>,<0.720470,-0.949138,-0.843262>,<-0.720470,-0.949138,-0.843262>,<-0.720470,-0.843262,-0.949138>,<0.699658,-0.964120,0.887677>,<0.699658,-0.887677,0.964120>,<-0.699658,-0.887677,0.964120>,<-0.699658,-0.964120,0.887677>,<-0.887677,0.964120,-0.699658>,<-0.964120,0.887677,-0.699658>,<-0.964120,0.887677,0.699658>,<-0.887677,0.964120,0.699658>,<-0.887677,0.699658,0.964120>,<-0.964120,0.699658,0.887677>,<-0.964120,-0.699658,0.887677>,<-0.887677,-0.699658,0.964120>,<0.964120,0.887677,-0.699658>,<0.887677,0.964120,-0.699658>,<0.887677,0.964120,0.699658>,<0.964120,0.887677,0.699658>,<0.699658,0.887677,0.964120>,<0.699658,0.964120,0.887677>,<-0.699658,0.964120,0.887677>,<-0.699658,0.887677,0.964120>,<0.887677,-0.964120,-0.699658>,<0.964120,-0.887677,-0.699658>,<0.964120,-0.887677,0.699658>,<0.887677,-0.964120,0.699658>,<0.887677,-0.699658,0.964120>,<0.964120,-0.699658,0.887677>,<0.964120,0.699658,0.887677>,<0.887677,0.699658,0.964120>,<-0.964120,-0.887677,-0.699658>,<-0.887677,-0.964120,-0.699658>,<-0.887677,-0.964120,0.699658>,<-0.964120,-0.887677,0.699658>,<-0.964120,0.699658,-0.887677>,<-0.887677,0.699658,-0.964120>,<-0.887677,-0.699658,-0.964120>,<-0.964120,-0.699658,-0.887677>,<0.964120,-0.699658,-0.887677>,<0.887677,-0.699658,-0.964120>,<0.887677,0.699658,-0.964120>,<0.964120,0.699658,-0.887677>,<0.699658,0.964120,-0.887677>,<0.699658,0.887677,-0.964120>,<-0.699658,0.887677,-0.964120>,<-0.699658,0.964120,-0.887677>,<0.699658,-0.887677,-0.964120>,<0.699658,-0.964120,-0.887677>,<-0.699658,-0.964120,-0.887677>,<-0.699658,-0.887677,-0.964120>,<-8.72466e-2,0.181764,0.866000>,<-8.72466e-2,-0.181764,0.866000>,<8.72466e-2,-0.181764,0.866000>,<8.72466e-2,0.181764,0.866000>,<0.866000,0.181764,8.72466e-2>,<0.866000,-0.181764,8.72466e-2>,<0.866000,-0.181764,-8.72466e-2>,<0.866000,0.181764,-8.72466e-2>,<8.72466e-2,-0.866000,8.72466e-2>,<-8.72466e-2,-0.866000,8.72466e-2>,<-8.72466e-2,-0.866000,-8.72466e-2>,<8.72466e-2,-0.866000,-8.72466e-2>,<-8.72466e-2,0.866000,8.72466e-2>,<8.72466e-2,0.866000,8.72466e-2>,<8.72466e-2,0.866000,-8.72466e-2>,<-8.72466e-2,0.866000,-8.72466e-2>,<-8.72466e-2,-0.181764,-0.866000>,<-8.72466e-2,0.181764,-0.866000>,<8.72466e-2,0.181764,-0.866000>,<8.72466e-2,-0.181764,-0.866000>,<-0.866000,-0.181764,8.72466e-2>,<-0.866000,0.181764,8.72466e-2>,<-0.866000,0.181764,-8.72466e-2>,<-0.866000,-0.181764,-8.72466e-2>,<-8.72466e-2,0.181764,0.946000>,<-8.72466e-2,-0.181764,0.946000>,<8.72466e-2,-0.181764,0.946000>,<8.72466e-2,0.181764,0.946000>,<0.946000,0.181764,8.72466e-2>,<0.946000,-0.181764,8.72466e-2>,<0.946000,-0.181764,-8.72466e-2>,<0.946000,0.181764,-8.72466e-2>,<8.72466e-2,-0.946000,8.72466e-2>,<-8.72466e-2,-0.946000,8.72466e-2>,<-8.72466e-2,-0.946000,-8.72466e-2>,<8.72466e-2,-0.946000,-8.72466e-2>,<-8.72466e-2,0.946000,8.72466e-2>,<8.72466e-2,0.946000,8.72466e-2>,<8.72466e-2,0.946000,-8.72466e-2>,<-8.72466e-2,0.946000,-8.72466e-2>,<-8.72466e-2,-0.181764,-0.946000>,<-8.72466e-2,0.181764,-0.946000>,<8.72466e-2,0.181764,-0.946000>,<8.72466e-2,-0.181764,-0.946000>,<-0.946000,-0.181764,8.72466e-2>,<-0.946000,0.181764,8.72466e-2>,<-0.946000,0.181764,-8.72466e-2>,<-0.946000,-0.181764,-8.72466e-2> } texture_list { 1, texture { dar } } face_indices { 620, <0,8,5>,0, <0,24,27>,0, <0,176,179>,0, <0,187,186>,0, <1,4,21>,0, <1,25,24>,0,<1,170,169>,0,<1,179,178>,0,<2,20,17>,0,<2,26,25>,0,<2,169,168>,0,<2,192,195>,0,<3,16,9>,0,<3,27,26>,0,<3,184,187>,0,<3,195,194>,0,<4,44,47>,0,<4,178,177>,0,<4,199,198>,0,<5,45,44>,0,<5,174,173>,0,<5,177,176>,0,<6,11,13>,0,<6,46,45>,0,<6,173,172>,0,<6,200,203>,0,<7,12,22>,0,<7,47,46>,0,<7,196,199>,0,<7,203,202>,0,<8,36,39>,0,<8,175,174>,0,<8,186,185>,0,<9,37,36>,0,<9,182,181>,0,<9,185,184>,0,<10,19,14>,0,<10,38,37>,0,<10,181,180>,0,<10,208,211>,0,<11,39,38>,0,<11,172,175>,0,<11,211,210>,0,<12,40,43>,0,<12,202,201>,0,<12,215,214>,0,<13,41,40>,0,<13,201,200>,0,<13,210,209>,0,<14,42,41>,0,<14,206,205>,0,<14,209,208>,0,<15,18,23>,0,<15,43,42>,0,<15,205,204>,0,<15,212,215>,0,<16,28,31>,0,<16,183,182>,0,<16,194,193>,0,<17,29,28>,0,<17,190,189>,0,<17,193,192>,0,<18,30,29>,0,<18,189,188>,0,<18,204,207>,0,<19,31,30>,0,<19,180,183>,0,<19,207,206>,0,<20,32,35>,0,<20,168,171>,0,<20,191,190>,0,<21,33,32>,0,<21,171,170>,0,<21,198,197>,0,<22,34,33>,0,<22,197,196>,0,<22,214,213>,0,<23,35,34>,0,<23,188,191>,0,<23,213,212>,0,<24,0,1>,0,<24,48,51>,0,<25,1,2>,0,<25,49,48>,0,<26,2,3>,0,<26,50,49>,0,<27,3,0>,0,<27,51,50>,0,<28,16,17>,0,<28,52,55>,0,<29,17,18>,0,<29,53,52>,0,<30,18,19>,0,<30,54,53>,0,<31,19,16>,0,<31,55,54>,0,<32,20,21>,0,<32,56,59>,0,<33,21,22>,0,<33,57,56>,0,<34,22,23>,0,<34,58,57>,0,<35,23,20>,0,<35,59,58>,0,<36,8,9>,0,<36,60,63>,0,<37,9,10>,0,<37,61,60>,0,<38,10,11>,0,<38,62,61>,0,<39,11,8>,0,<39,63,62>,0,<40,12,13>,0,<40,64,67>,0,<41,13,14>,0,<41,65,64>,0,<42,14,15>,0,<42,66,65>,0,<43,15,12>,0,<43,67,66>,0,<44,4,5>,0,<44,68,71>,0,<45,5,6>,0,<45,69,68>,0,<46,6,7>,0,<46,70,69>,0,<47,7,4>,0,<47,71,70>,0,<48,24,25>,0,<48,72,75>,0,<49,25,26>,0,<49,73,72>,0,<50,26,27>,0,<50,74,73>,0,<51,27,24>,0,<51,75,74>,0,<52,28,29>,0,<52,76,79>,0,<53,29,30>,0,<53,77,76>,0,<54,30,31>,0,<54,78,77>,0,<55,31,28>,0,<55,79,78>,0,<56,32,33>,0,<56,80,83>,0,<57,33,34>,0,<57,81,80>,0,<58,34,35>,0,<58,82,81>,0,<59,35,32>,0,<59,83,82>,0,<60,36,37>,0,<60,84,87>,0,<61,37,38>,0,<61,85,84>,0,<62,38,39>,0,<62,86,85>,0,<63,39,36>,0,<63,87,86>,0,<64,40,41>,0,<64,88,91>,0,<65,41,42>,0,<65,89,88>,0,<66,42,43>,0,<66,90,89>,0,<67,43,40>,0,<67,91,90>,0,<68,44,45>,0,<68,92,95>,0,<69,45,46>,0,<69,93,92>,0,<70,46,47>,0,<70,94,93>,0,<71,47,44>,0,<71,95,94>,0,<72,48,49>,0,<72,96,99>,0,<73,49,50>,0,<73,97,96>,0,<74,50,51>,0,<74,98,97>,0,<75,51,48>,0,<75,99,98>,0,<76,52,53>,0,<76,100,103>,0,<77,53,54>,0,<77,101,100>,0,<78,54,55>,0,<78,102,101>,0,<79,55,52>,0,<79,103,102>,0,<80,56,57>,0,<80,104,107>,0,<81,57,58>,0,<81,105,104>,0,<82,58,59>,0,<82,106,105>,0,<83,59,56>,0,<83,107,106>,0,<84,60,61>,0,<84,108,111>,0,<85,61,62>,0,<85,109,108>,0,<86,62,63>,0,<86,110,109>,0,<87,63,60>,0,<87,111,110>,0,<88,64,65>,0,<88,112,115>,0,<89,65,66>,0,<89,113,112>,0,<90,66,67>,0,<90,114,113>,0,<91,67,64>,0,<91,115,114>,0,<92,68,69>,0,<92,116,119>,0,<93,69,70>,0,<93,117,116>,0,<94,70,71>,0,<94,118,117>,0,<95,71,68>,0,<95,119,118>,0,<96,72,73>,0,<96,120,123>,0,<97,73,74>,0,<97,121,120>,0,<98,74,75>,0,<98,122,121>,0,<99,75,72>,0,<99,123,122>,0,<100,76,77>,0,<100,124,127>,0,<101,77,78>,0,<101,125,124>,0,<102,78,79>,0,<102,126,125>,0,<103,79,76>,0,<103,127,126>,0,<104,80,81>,0,<104,128,131>,0,<105,81,82>,0,<105,129,128>,0,<106,82,83>,0,<106,130,129>,0,<107,83,80>,0,<107,131,130>,0,<108,84,85>,0,<108,132,135>,0,<109,85,86>,0,<109,133,132>,0,<110,86,87>,0,<110,134,133>,0,<111,87,84>,0,<111,135,134>,0,<112,88,89>,0,<112,136,139>,0,<113,89,90>,0,<113,137,136>,0,<114,90,91>,0,<114,138,137>,0,<115,91,88>,0,<115,139,138>,0,<116,92,93>,0,<116,140,143>,0,<117,93,94>,0,<117,141,140>,0,<118,94,95>,0,<118,142,141>,0,<119,95,92>,0,<119,143,142>,0,<120,96,97>,0,<120,144,147>,0,<121,97,98>,0,<121,145,144>,0,<122,98,99>,0,<122,146,145>,0,<123,99,96>,0,<123,147,146>,0,<124,100,101>,0,<124,148,151>,0,<125,101,102>,0,<125,149,148>,0,<126,102,103>,0,<126,150,149>,0,<127,103,100>,0,<127,151,150>,0,<128,104,105>,0,<128,152,155>,0,<129,105,106>,0,<129,153,152>,0,<130,106,107>,0,<130,154,153>,0,<131,107,104>,0,<131,155,154>,0,<132,108,109>,0,<132,156,159>,0,<133,109,110>,0,<133,157,156>,0,<134,110,111>,0,<134,158,157>,0,<135,111,108>,0,<135,159,158>,0,<136,112,113>,0,<136,160,163>,0,<137,113,114>,0,<137,161,160>,0,<138,114,115>,0,<138,162,161>,0,<139,115,112>,0,<139,163,162>,0,<140,116,117>,0,<140,164,167>,0,<141,117,118>,0,<141,165,164>,0,<142,118,119>,0,<142,166,165>,0,<143,119,116>,0,<143,167,166>,0,<144,120,121>,0,<144,264,267>,0,<145,121,122>,0,<145,265,264>,0,<146,122,123>,0,<146,266,265>,0,<147,123,120>,0,<147,267,266>,0,<148,124,125>,0,<148,268,271>,0,<149,125,126>,0,<149,269,268>,0,<150,126,127>,0,<150,270,269>,0,<151,127,124>,0,<151,271,270>,0,<152,128,129>,0,<152,272,275>,0,<153,129,130>,0,<153,273,272>,0,<154,130,131>,0,<154,274,273>,0,<155,131,128>,0,<155,275,274>,0,<156,132,133>,0,<156,276,279>,0,<157,133,134>,0,<157,277,276>,0,<158,134,135>,0,<158,278,277>,0,<159,135,132>,0,<159,279,278>,0,<160,136,137>,0,<160,280,283>,0,<161,137,138>,0,<161,281,280>,0,<162,138,139>,0,<162,282,281>,0,<163,139,136>,0,<163,283,282>,0,<164,140,141>,0,<164,284,287>,0,<165,141,142>,0,<165,285,284>,0,<166,142,143>,0,<166,286,285>,0,<167,143,140>,0,<167,287,286>,0,<168,20,2>,0,<168,216,219>,0,<169,2,1>,0,<169,217,216>,0,<170,1,21>,0,<170,218,217>,0,<171,21,20>,0,<171,219,218>,0,<172,11,6>,0,<172,220,223>,0,<173,6,5>,0,<173,221,220>,0,<174,5,8>,0,<174,222,221>,0,<175,8,11>,0,<175,223,222>,0,<176,0,5>,0,<176,224,227>,0,<177,5,4>,0,<177,225,224>,0,<178,4,1>,0,<178,226,225>,0,<179,1,0>,0,<179,227,226>,0,<180,19,10>,0,<180,228,231>,0,<181,10,9>,0,<181,229,228>,0,<182,9,16>,0,<182,230,229>,0,<183,16,19>,0,<183,231,230>,0,<184,3,9>,0,<184,232,235>,0,<185,9,8>,0,<185,233,232>,0,<186,8,0>,0,<186,234,233>,0,<187,0,3>,0,<187,235,234>,0,<188,23,18>,0,<188,236,239>,0,<189,18,17>,0,<189,237,236>,0,<190,17,20>,0,<190,238,237>,0,<191,20,23>,0,<191,239,238>,0,<192,2,17>,0,<192,240,243>,0,<193,17,16>,0,<193,241,240>,0,<194,16,3>,0,<194,242,241>,0,<195,3,2>,0,<195,243,242>,0,<196,7,22>,0,<196,244,247>,0,<197,22,21>,0,<197,245,244>,0,<198,21,4>,0,<198,246,245>,0,<199,4,7>,0,<199,247,246>,0,<200,6,13>,0,<200,248,251>,0,<201,13,12>,0,<201,249,248>,0,<202,12,7>,0,<202,250,249>,0,<203,7,6>,0,<203,251,250>,0,<204,18,15>,0,<204,252,255>,0,<205,15,14>,0,<205,253,252>,0,<206,14,19>,0,<206,254,253>,0,<207,19,18>,0,<207,255,254>,0,<208,10,14>,0,<208,256,259>,0,<209,14,13>,0,<209,257,256>,0,<210,13,11>,0,<210,258,257>,0,<211,11,10>,0,<211,259,258>,0,<212,15,23>,0,<212,260,263>,0,<213,23,22>,0,<213,261,260>,0,<214,22,12>,0,<214,262,261>,0,<215,12,15>,0,<215,263,262>,0,<216,168,169>,0,<217,169,170>,0,<217,218,219>,0,<218,170,171>,0,<219,171,168>,0,<219,216,217>,0,<220,172,173>,0,<221,173,174>,0,<221,222,223>,0,<222,174,175>,0,<223,175,172>,0,<223,220,221>,0,<224,176,177>,0,<225,177,178>,0,<225,226,227>,0,<226,178,179>,0,<227,179,176>,0,<227,224,225>,0,<228,180,181>,0,<229,181,182>,0,<229,230,231>,0,<230,182,183>,0,<231,183,180>,0,<231,228,229>,0,<232,184,185>,0,<233,185,186>,0,<233,234,235>,0,<234,186,187>,0,<235,187,184>,0,<235,232,233>,0,<236,188,189>,0,<237,189,190>,0,<237,238,239>,0,<238,190,191>,0,<239,191,188>,0,<239,236,237>,0,<240,192,193>,0,<241,193,194>,0,<241,242,243>,0,<242,194,195>,0,<243,195,192>,0,<243,240,241>,0,<244,196,197>,0,<245,197,198>,0,<245,246,247>,0,<246,198,199>,0,<247,199,196>,0,<247,244,245>,0,<248,200,201>,0,<249,201,202>,0,<249,250,251>,0,<250,202,203>,0,<251,203,200>,0,<251,248,249>,0,<252,204,205>,0,<253,205,206>,0,<253,254,255>,0,<254,206,207>,0,<255,207,204>,0,<255,252,253>,0,<256,208,209>,0,<257,209,210>,0,<257,258,259>,0,<258,210,211>,0,<259,211,208>,0,<259,256,257>,0,<260,212,213>,0,<261,213,214>,0,<261,262,263>,0,<262,214,215>,0,<263,215,212>,0,<263,260,261>,0,<264,144,145>,0,<264,288,291>,0,<265,145,146>,0,<265,289,288>,0,<266,146,147>,0,<266,290,289>,0,<267,147,144>,0,<267,291,290>,0,<268,148,149>,0,<268,292,295>,0,<269,149,150>,0,<269,293,292>,0,<270,150,151>,0,<270,294,293>,0,<271,151,148>,0,<271,295,294>,0,<272,152,153>,0,<272,296,299>,0,<273,153,154>,0,<273,297,296>,0,<274,154,155>,0,<274,298,297>,0,<275,155,152>,0,<275,299,298>,0,<276,156,157>,0,<276,300,303>,0,<277,157,158>,0,<277,301,300>,0,<278,158,159>,0,<278,302,301>,0,<279,159,156>,0,<279,303,302>,0,<280,160,161>,0,<280,304,307>,0,<281,161,162>,0,<281,305,304>,0,<282,162,163>,0,<282,306,305>,0,<283,163,160>,0,<283,307,306>,0,<284,164,165>,0,<284,308,311>,0,<285,165,166>,0,<285,309,308>,0,<286,166,167>,0,<286,310,309>,0,<287,167,164>,0,<287,311,310>,0,<288,264,265>,0,<289,265,266>,0,<289,290,291>,0,<290,266,267>,0,<291,267,264>,0,<291,288,289>,0,<292,268,269>,0,<293,269,270>,0,<293,294,295>,0,<294,270,271>,0,<295,271,268>,0,<295,292,293>,0,<296,272,273>,0,<297,273,274>,0,<297,298,299>,0,<298,274,275>,0,<299,275,272>,0,<299,296,297>,0,<300,276,277>,0,<301,277,278>,0,<301,302,303>,0,<302,278,279>,0,<303,279,276>,0,<303,300,301>,0,<304,280,281>,0,<305,281,282>,0,<305,306,307>,0,<306,282,283>,0,<307,283,280>,0,<307,304,305>,0,<308,284,285>,0,<309,285,286>,0,<309,310,311>,0,<310,286,287>,0,<311,287,284>,0,<311,308,309>,0 } } // Persistence of Vision Ray Tracer Scene Description File // File: menger_sphere.pov // Vers: 3.5 // Desc: Menger's sponge stuff // Date: 16/08/2003 // Auth: Jean-Charles Marteau // #declare Neighbours = array[20] { // haut <-1, 1,-1>, < 0, 1,-1>, < 1, 1,-1>, <-1, 1, 0>, < 1, 1, 0>, <-1, 1, 1>, < 0, 1, 1>, < 1, 1, 1>, // milieu <-1, 0,-1>, < 1, 0,-1>, <-1, 0, 1>, < 1, 0, 1>, // bas <-1,-1,-1>, < 0,-1,-1>, < 1,-1,-1>, <-1,-1, 0>, < 1,-1, 0>, <-1,-1, 1>, < 0,-1, 1>, < 1,-1, 1> } #declare Nb_objects=0; // Creates a menger sponge made of any objects. // - Level is the max level of recursion the fractal will go to. // - Obj is the object the sponge will be made of, it should fit in box { -0.4, 0.4 } // - Turb is the fractal level turbulence, if positive, the result will have various levels // of recursion choosen in a random way ( 0 <= Turb ~< Level ) . // - Filling, it is the probability that a sub-object will be present ( 0.0 < Filling <= 1.0 ) // - Random seed used if Turb <> 0 or Filling < 1.0 // Number of objects increases when you increase Level or Filling, it decreases // when you increase Turb. #macro Menger_Sponge (Level, Obj, Turb, Filling, TheSeed) #if (Level <= 0) #declare Nb_objects = Nb_objects + 1; object { Obj } #if (mod(Nb_objects,10000) = 0) #debug concat ("Number of objects = ", str (Nb_objects,0,6), "\n") #end #else union { #local i = 0; #while (i < dimension_size (Neighbours, 1)) #if (rand(TheSeed) < Filling) object { Menger_Sponge (Level-(1+floor(Turb*rand(TheSeed))), Obj, Turb, Filling, TheSeed) translate Neighbours[i] } #end #local i = i + 1; #end // end while scale 1/3 } #end #end object { Menger_Sponge ( 4, // recursion depth object { kevmed scale 0.4 }, 1.5, // turbulence 0.94, // solidity (1 is no gaps, 0 is lots (all?) gaps) rseed ) pigment { color rgb 0.5 } finish { ambient 0 diffuse 1 specular 1 roughness 0.03 } translate <0, 0.5, 0> scale 4 } union { #declare cc = 0; #while (cc < 640) #declare xx = -8 + (rand(rubble_seed) * 32); #declare zz = -8 + (rand(rubble_seed) * 32); #declare ok_fine = true; #if (xx < 2) #if (xx > -2) #if (zz < 2) #if (zz > -2) #declare ok_fine = false; #end #end #end #end #if (ok_fine = true) object { kevmed #if (rubble_rnd(2) = 0) rotate translate <0, 0.6, 0> #else rotate y*rubble_rnd(360) translate <0, 1, 0> #end scale rubble_rrand(0.03, 0.08) translate } #declare cc = cc + 1; #end #end pigment { color rgb 0.5 } finish { ambient 0 diffuse 1 specular 1 roughness 0.03 } } light_source { // moon light <-3000, 3000, 3000> color rgb (0.2 * <0, 0.5, 1> + 0.3) * 0.6 } light_source { // light inside object - center <0, 2, 0> color rgb <1, 0.5, 0> * 0.5 + 0.5 fade_distance 1.2 fade_power 2 } light_source { // light inside object - lower left near <-1.33, 0.66, -1.33> color rgb <1, 0, 0> fade_distance 0.5 fade_power 2 } light_source { // light inside object - left upper <-1.33, 2 + 1.33, 0> color rgb <0, 1, 1> fade_distance 0.5 fade_power 2 } light_source { // light inside object - front, upper right <1.33, 2 + 1.33, -1.33> color rgb <0, 1, 0> fade_distance 0.5 fade_power 2 } light_source { // light inside object - left face, lower rear <-1.33, 0.33, 1.33> color rgb <1, 0, 1> fade_distance 0.5 fade_power 2 } light_source { // light inside object - front face, upper left <-1.33, 2 + 1.33, -1.33> color rgb <0, 0, 1> fade_distance 0.5 fade_power 2 } light_source { // light inside object - front face, lower right <1.33, 0.33, -1.33> color rgb <1, 1, 0> fade_distance 0.5 fade_power 2 } #macro add_alpha(color_a, alpha_a) #local fv = color_a + <0, 0, 0>; #end #macro one_or_one() // used for random trendy lines #local dummy = rand(line_seed); #if (rand(line_seed) > 0.5) #local return_one = 1; #else #local return_one = -1; #end return_one #end #macro rrand_line(rlo, rhi) // used for random trendy lines #local real_lo = min(rlo, rhi); #local real_hi = max(rlo, rhi); #local rresult = (rand(line_seed) * (rhi - rlo)) + rlo; rresult #end #macro Sqr(n) #local sqr_result = n * n; sqr_result #end // random trendy lines #declare line_thick = (1 / image_height) * 0.8; // double this for double-sized rendering #declare h_bounds = (image_width / image_height) * 0.5; #declare max_diag = 0.1; #declare min_diag = 0.02; #declare max_straight = 0.5; #declare min_straight = 0.05; /* union { // random tech lines - changed merge to union for speed #declare xx = 0; #while (xx < 10) #if (rand(line_seed) > 0.5) #declare current_dir = ; #else #declare current_dir = <0, one_or_one(), 0>; #end #declare current_loc = ; #declare cc = 0; #while (cc < 15) // calculate length of next segment #if (vlength(current_dir) > 1.01) // if diagonal #declare s_len = min_diag + Sqr(rand(line_seed)) * (max_diag - min_diag); #else #declare s_len = min_straight + Sqr(rand(line_seed)) * (max_straight - min_straight); #end // draw next segment sphere { current_loc, line_thick } cylinder { current_loc, current_loc + current_dir * s_len, line_thick } // update position/location #declare current_loc = current_loc + current_dir * s_len; // pick new direction #if (vlength(current_dir) > 1.01) // if diagonal, don't pick diagonal // for NON diagonal, set one of the "1" components to 0 #if (rand(line_seed) > 0.2) // bias toward horizontal lines #declare current_dir = ; #else #declare current_dir = <0, current_dir.y, 0>; #end #else // if not diaganal - try to pick diagonal // find out which component is one and set one of the other to be one or -1 #if (abs(current_dir.x) > 0.1) // X is one #declare current_dir = ; #else #declare current_dir = ; #end #end // continue looping #declare cc = cc + 1; #end #declare xx = xx + 1; #end no_shadow pigment { color rgbt <0, 0, 0, 0.85> } finish { ambient 1 diffuse 0 } scale 0.7 translate <0, 0, 0.001 + line_thick> overlay_transforms() } */ /* actual end of this file */