#include "Colors.Inc" #include "Textures.Inc" #declare renderMode = 99; // 0 = low, 99 = high global_settings { max_trace_level 400 //assumed_gamma 1.3 /* radiosity{ pretrace_start 1 pretrace_end 1 count 400 error_bound 0.05 nearest_count 1 // CHANGE - range from 1 to 3 - should correspond with pretrace_end recursion_limit 1 // CHANGE low_error_factor 1 // leave this gray_threshold 0 // leave this minimum_reuse 0.015 // leave this brightness 1 // leave this adc_bailout 0.01/2 // CHANGE - use adc_bailo } */ } background { color White } camera { location <0,0,-500> look_at <0.0,0.0,0.0> right up y } light_source { <2000,2000,-1500> color White } light_source { <-2000,2000,-1500> color White } #declare BGlass=texture { pigment { color rgbf <1,1,1,.9> } finish { ambient .75 //0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #declare BGlass2=texture { pigment { color rgbf <.9, .85, .80,.9> } finish { ambient .75 //0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } // create a 3-D slice of a 4-D julia fractal object #declare Fractal = julia_fractal { <-0.083,0.0,-0.83,-0.025> quaternion // hypercomplex sqr // TYPE: sqr | cube | exp | reciprocal | sin | asin | sinh | asinh | cos | acos | // cosh | acosh | tan | atan | tanh | atanh | log | pwr( X_Val, Y_Val ) max_iteration 12 //10 //12 precision 500 //50 //500 // slice <0,0,0,1>,0 scale 100 rotate <90,0,0> rotate <0,0,-45> rotate <0,-5,0> translate <80,0,0> //texture { Aluminum } //pigment { color White } } #local R1 = seed(1000); #macro Bar() union { #local sweep_ang = 7; #local gap = .5; #local len = rand(R1)*90 + 10; //100; #local w = 5; #local h = 1; //rand(R1)*4+1; #local transX = -75-(rand(R1)*500); // main bar //# if (int(rand(R1) * 4) = 0) box { <-len,-h,-w>,<0,h,w> #if(renderMode = 99) texture { BGlass2 } //---------------------------------------- //texture { Aluminum } #end } //#end // inner end box { <-gap, -(h+gap), -(w+gap)>, } // outer end box { <-gap, -(h+gap), -(w+gap)>, translate <-len, 0, 0> } # if (int(rand(R1) * 50) = 0) difference { torus { abs(transX), .5 } box { <0, -1000, -1000>, <1000, 1000, 1000> } translate } sphere { , 1 } sphere { , 1 } #end // goes into center //cylinder { <0,0,0>,, gap } // rotate <0,0,rand(R1)*sweep_ang+rand(R1)*-sweep_ang> translate rotate <0, 0, rand(R1)*sweep_ang+rand(R1)*-sweep_ang> rotate <0, rand(R1) * 360, 0> #if(renderMode = 99) texture { Aluminum } #end } #end #declare Center = union { #local w = 10; #local step = 30; difference { cylinder { <0,-1000,0>,<0,40,0>, 50 } cylinder { <0,-2000,0>,<0,2000,0>, 47 } } torus { 48.5, 1.5 translate <0, 40, 0> } #local n = 0; #while (n < 100) #local h = rand(R1)*40 + 40; #local r = rand(R1)*5 + 1; union { cylinder { <0, 0, 0>, <0, h, 0>, r } sphere { <0, h, 0>, r } translate rotate <0, rand(R1)*360, 0> } #local n = n + 1; #end #local n = 0; #while (n < 360) // vertical union { box { <-w, -1000, -1>, } // top cylinder { <-w, 40, 0>, , 1 } // left cylinder { <-w, -1000, 0>, <-w, 40, 0>, 1 } cylinder { , , 1 } translate <0, 0, -55> rotate <0, n, 0> } // top union { box { <-w, 0, -1>, } cylinder { <-w, 20, 0>, , 1 } cylinder { <-w, 0, 0>, <-w, 20, 0>, 1 } cylinder { , , 1 } sphere { <-w, 20, 0>, 1 } sphere { , 1 } sphere { <-w, 0, 0>, 1 } sphere { , 1 } union { cylinder { <-w, 0, -10>, <-w, 0, 0>, 1 } cylinder { , , 1 } cylinder { <-w, 0, -10>, , 1 } sphere { <-w, 0, -10>, 1 } sphere { , 1 } box { <-w, 0, -10>, texture { BGlass } } rotate <60, 0, 0> translate <0, 20, 0> } rotate <-60, 0, 0> translate <0, 40, -55> rotate <0, n, 0> } // center union { box { <-w, 0, -1>, } cylinder { <-w, 50, 0>, , 1 } cylinder { <-w, 0, 0>, <-w, 50, 0>, 1 } cylinder { , , 1 } sphere { <-w, 50, 0>, 1 } sphere { , 1 } //torus { w, 1 translate <0,0,-w*2> rotate <60, 0, 0> translate <0, 50, 0> } //torus { w/2, 1 translate <0,0,-w*4> rotate <60, 0, 0> translate <0, 50, 0> } union { cylinder { <-w, 0, -40>, <-w, 0, 0>, 1 } cylinder { , , 1 } cylinder { <-w, 0, -40>, , 1 } sphere { <-w, 0, -40>, 1 } sphere { , 1 } box { <-w, 0, -40>, texture { BGlass } } rotate <60, 0, 0> translate <0, 50, 0> } rotate <-60, 0, 0> translate <0, 0, -55> rotate <0, n, 0> } #local n = n + step; #end #if(renderMode = 99) texture { Aluminum } #end } #declare Outer = union { #local n = 0; #while (n < 2000) Bar() #local n = n + 1; #end } #declare Stuff = union { object { Outer } object { Center } rotate <-30,0,0> translate <80,0,-30> texture { //Aluminum pigment { color White } //BGlass2 } } //object { Outer } //object { Center } object { Stuff } //object { Fractal }