// vi:set sts=2 sw=2 ai: #include "colors.inc" #include "woods.inc" #include "metals.inc" #include "glass.inc" #include "stones1.inc" light_source { < -1000, 10000, -1000 >, color White } global_settings { ambient_light .5 } camera { location < 0, 0, -600 > look_at < 0, 0, 0 > } #declare door_opening = intersection { plane { x, 0 rotate y * -145 } plane { x, 0 rotate y * -35 } } #declare both_openings = union { object { door_opening rotate y * 90 } object { door_opening rotate y * -90 } } #declare car_glass = difference { difference { cylinder { < 0, 60, 0 >, < 0, -50, 0 >, 40 } cylinder { < 0, 70, 0 >, < 0, -60, 0 >, 37 } } object { both_openings } texture { T_Glass3 } interior { I_Glass } } #declare railing_support = union { intersection { torus { 6, 3 } plane { x, 0 } plane { z, 0 } rotate z * -90 rotate y * -90 } cylinder { < 0, 0, 0 >, < 0, -52, 0 >, 3 translate x * 6 } rotate y * 90 translate y * -1 } #declare hand_rail = union { difference { torus { 34, 3 translate y * 5 } object { both_openings } } object { railing_support translate x * -34 rotate y * 35 } object { railing_support translate x * 34 rotate y * -35 } object { railing_support rotate y * 180 translate x * -34 rotate y * -35 } object { railing_support rotate y * 180 translate x * 34 rotate y * 35 } texture { T_Brass_3C } } #declare lid_ring = union { torus { 30, 2 } cylinder { < 0, -2, 0 >, < 0, 2, 0 >, 30 } scale < 4/3,1,4/3 > texture { T_Brass_3C } } #declare top_lid = union { difference { object { lid_ring } sphere { < 0, -2, 0 >, 2 scale < 4, 1, 4 > } } light_source { < 0, -2, 0 >, White looks_like { sphere { < 0, 0, 0 > 2 scale < 4, 1, 4 > texture { pigment { color White } finish { ambient White * 2 } } } } } translate y * 60 } #declare cap = intersection { sphere { < 0, 0, 0 >, 40 } plane { y, 0 } scale < 1, .6, 1 > } #declare cable_connector = sphere { < 0, 0, 0 >, 6 texture { T_Wood4 rotate x * 5 scale 30 } } #declare cable = union { #declare i = 0; #while ( i < 50 ) torus { 2, .5 rotate z * 30 translate y * i * .75 } #declare i = i + 1; #end texture { T_Chrome_2A } } #declare hallway_shape = box { < 0, 60, -20 >, < 400, -50, 20 > } #declare t_wall = texture { T_Wood4 finish { ambient .5 } scale 40 rotate x * 85 } #declare t_floor = texture { T_Stone18 finish { ambient 1 diffuse 0 } scale 40 } #declare t_ceiling = texture { T_Brass_3C finish { ambient .4 } } #declare r1 = seed(2343); #macro hall_section(light) union { box { < -19.5, -50, 19.8 >, < 19.5, 60, 20 > texture { t_wall translate < rand(r1) * 50, rand(r1) * 50, 0 > } } box { < -19.5, -50, 0 >, < 19.5, -49.8, 20 > texture { t_floor translate < rand(r1) * 50, 0, rand(r1) * 50 > } } box { < -19.5, 59.8, 0 >, < 19.5, 60, 20 > texture { t_ceiling } no_shadow } #if ( light ) light_source { < 0, 59.9, 10 >, White / 2 cylinder radius 15 falloff 18 tightness 10 area_light < -18, 0, 18 >, < 18, 0, 0 >, 5, 5 adaptive 1 jitter point_at < 0, -50, 10 > } light_source { < 0, 19, 17.5 >, White * 10 fade_distance 1 fade_power .85 } difference { intersection { sphere { < -6, 0, 0 >, 10 } sphere { < 6, 0, 0 >, 10 } plane { y, 0 } } intersection { sphere { < -6.2, 0, 0 >, 10 } sphere { < 6.2, 0, 0 >, 10 } } texture { T_Brass_3C } rotate x * 5 translate < 0, 20, 23 > } #end } #end union { difference { union { difference { plane { z, 0 rotate y * 180 } object { hallway_shape translate x * 44 } object { hallway_shape translate x * -444 } texture { T_Chrome_2A } } #declare i = 0; #while ( i < 10 ) #declare foo = hall_section(mod(i,2)) #declare bar = hall_section(mod(i,2)) #declare i = i + 1; object { foo translate x * ( ( i * 40 ) + 25 ) } object { bar translate x * ( ( i * -40 ) - 25 ) } #end } cylinder { < 0, -450, 0 >, < 0, 450, 0 >, 45 texture { T_Chrome_2A } } } cylinder { < 0, -400, 0 >, < 0, 400, 0 >, 4 translate z * 48 rotate y * 12 texture { T_Copper_4C } } cylinder { < 0, -400, 0 >, < 0, 400, 0 >, 4 translate z * 48 rotate y * -37 texture { T_Copper_4D } } } union { object { car_glass } object { hand_rail } object { top_lid } object { cap rotate z * 180 translate y * 62 texture { T_Wood4 rotate x * 5 scale 30 translate < rand(r1) * 50, rand(r1) * 50, 0 > } } object { lid_ring translate y * -50 } object { cap translate y * -52 texture { T_Wood4 rotate x * 5 scale 30 translate < rand(r1) * 50, rand(r1) * 50, 0 > } } object { cable_connector translate y * 86 } object { cable translate y * 90 } }