#include "textures.inc" #include "colors.inc" #include "golds.inc" #include "functions.inc" #include "math.inc" #declare D = 0.00001; #declare FocalBlur = true; #declare Radiosity = false; #declare AreaLight = true; #declare R1 = seed(1); #declare R2 = seed(2); camera { // orthographic location <-20, 15, 10> look_at <0, 0, 0> #if (FocalBlur) focal_point <-5, 10, -5> variance 1/10000 aperture 1 blur_samples 20 #end } #if(Radiosity) global_settings { radiosity { count 500 } } #else #declare A = 50; light_source { <-100, 100, -50>, color rgb <1, 1, 1> #if (AreaLight) area_light , <0, 0, A>, 10, 10 adaptive 1.5 jitter #end } #end sky_sphere { pigment { color rgb <0.5, 0.6, 0.8> } } /* plane { y, -11 pigment { color rgb <1, 1, 1> } } */ #declare Rusty = texture { Silver_Metal // a metal object ... finish { reflection 0.3 } normal { // ... which has suffered a beating dents 2 scale 1.5 } } // (end of base texture) texture { // ... has some flecks of rust ... pigment { granite color_map { [0.0 rgb <.2, 0, 0> ] [0.2 color Brown ] [0.2 rgbt <1, 1, 1, 1> ] [1.0 rgbt <1, 1, 1, 1> ] } frequency 16 } } // (end rust fleck texture) texture { // ... and some sooty black marks pigment { bozo color_map { [0.0 color Black ] [0.2 color rgbt <0, 0, 0, .5> ] [0.4 color rgbt <.5, .5, .5, .5> ] [0.5 color rgbt <1, 1, 1, 1> ] [1.0 color rgbt <1, 1, 1, 1> ] } scale 3 } } // (end of sooty mark texture) // texture { T_Gold_1C } #declare Bend = difference { torus { 0.5, 0.2 rotate <90, 0, 0> } plane { -y, 0 } } #declare Bend2 = union { object { Bend } object { Bend rotate <180, 0, 0> translate <1, 0, 0> } } #declare Bend3 = union { object { Bend2 } object { Bend2 rotate <180, 0, 0> translate <0, 0, -1> } } #declare Bend4 = union { object { Bend3 } object { Bend3 rotate <0, 90, 0> translate <1, 0, 0> } } #declare Bend5 = #local X = -10; union { #while(X < 10) object { Bend4 translate #local X = X + 1; } #end } #declare Bend6 = #local Z = -10; union { #while(Z < 10) object { Bend5 translate <0, 0, Z * 2> #local Z = Z + 1; } #end translate <0, 0, 1> } #declare R = 0.5; #declare A = 0; union { object { Bend6 scale 0.5 translate <0, -10, 0> } object { Bend6 scale 0.5 translate <0, 10, 0> } #while(A < 360) box { <-10 - R, -R, -R> <10 + R, R, R> translate <0, 10, 10> rotate <0, A, 0> } box { <-10 - R, -R, -R> <10 + R, R, R> translate <0, -10, 10> rotate <0, A, 0> } box { <-R, -10 - R, -R> translate <10, 0, 10> rotate <0, A, 0> } object { Bend6 scale 0.5 rotate <0, 0, 90> translate <-10, 0, 0> rotate <0, A, 0> } #local A = A + 90; #end // texture { Silver2 } // texture { T_Gold_1C } texture { Rusty } scale 0.5 } /* isosurface { function { y - f_noise3d(x * 5 , 0, z * 5) * 0.5 } contained_by { box { <-400, 0, -400>, <400, 1, 400> } } translate <0, -6, 0> pigment { color rgb <1, 1, 1> } finish { ambient 0.3 } } */