// Persistence Of Vision raytracer version 3.0 file. // by Simon Smith #version 3.0 global_settings { assumed_gamma 2.2 } #include "shapes.inc" #include "colors.inc" #include "textures.inc" #include "metals.inc" #include "glass.inc" // Dimensions in mm camera { location <-2500, 1200, 100> direction <0.0, 0.0, 1.67> up <0.0, 1.0, 0.0> right <4/3, 0.0, 0.0> look_at <0, 500, 0> } // Define a couple of colors for the light sources. #declare MainLight = color red 0.8 green 0.8 blue 0.8 #declare FillLight = color red 0.25 green 0.25 blue 0.25 light_source { <-2000, 6000, -5000> color MainLight } light_source { <2000, 5000, 5000> color FillLight } // The Table #declare Table_Top = union { cone { <0, 707, 0>, 599, <0, 708, 0> 600 } cylinder { <0, 708, 0>, <0, 719, 0>, 600 } cone { <0, 719, 0>, 600, <0, 720, 0> 599 } texture { T_Glass4 } } #declare Leg = intersection { difference { cylinder { <0, -550, 0>, <0, 550, 0>, 17 rotate <0, 0, -45> translate <0, 353.5, -58> } cylinder { <0, -550, 0>, <0, 550, 0>, 15.5 rotate <0, 0, -45> translate <0, 353.5, -58> } } box { <-378, 3, -76> <378, 707, -40> } // Allow 3mm for the rubber feet texture { Polished_Chrome } } // Textures for rubber feet // Ridiculous overkill, but hey, I could do with the CSG and texture practice #declare Grips= normal { gradient <0, 1, 0> frequency 10 slope_map { [0.00 <0.00, 0>] [0.25 <0.00, 0>] [0.25 <0.00, 1>] [0.50 <0.25, 1>] [0.50 <0.25, -1>] [0.75 <0.00, -1>] [0.75 <0.00, 0>] [1.00 <0.00, 0>] } } #declare Seam= normal { gradient <0, 0, 1> frequency 10 slope_map { [0.00 <0.0, 0>] [0.05 <0.0, 0>] [0.05 <0.0, 1>] [0.50 <0.5, 1>] [0.50 <0.5, -1>] [0.95 <0.0, -1>] [0.95 <0.0, 0>] [1.00 <0.0, 0>] } } #declare Rubber_Foot = // Typical, the rubber feet are the most complex shape in the whole piece :-) union { intersection { difference { cylinder { <0, -550, 0>, <0, 550, 0>, 15.5 rotate <0, 0, -45> translate <0, 353.5, -58> } cylinder { <0, -550, 0>, <0, 550, 0>, 12.5 rotate <0, 0, -45> translate <0, 353.5, -58> } } box { <-378, 3, -76> <-305, 23, -40> } } intersection { union { cylinder { <0, 0, 0>, <0, 3, 0>, 14 scale <1.41, 1, 1> translate <-350.5, 0, -58> } torus { 14, 3 scale <1.41, 1, 1> translate <-350.5, 3, -58> } } box { <-378, 0, -76> <-305, 3, -40> } } texture { pigment { rgb <0.2, 0.15, 0.15> } normal { gradient <0, 0, 1> normal_map { [0.000 Grips ] [0.475 Grips ] [0.475 Seam ] [0.525 Seam ] [0.525 Grips ] [1.000 Grips ] } } finish { Dull } scale <30, 30, 30> translate <0, 0, 17> } clipped_by { box { <-378, 0, -76> <-305, 24, -40> } } bounded_by { box { <-378, 0, -76> <-305, 24, -40> } } } #declare Aluminium_Joint = difference { box { <-90, 25, -90> <90, 50, 90> } cylinder { <0, -100, 0>, <0, 100, 0>, 17 rotate <0, 0, -45> translate <0, 0, -58>} cylinder { <0, -100, 0>, <0, 100, 0>, 17 rotate <0, 0, -45> translate <0, 0, -58> rotate <0, 90, 0> } cylinder { <0, -100, 0>, <0, 100, 0>, 17 rotate <0, 0, -45> translate <0, 0, -58> rotate <0, 180, 0> } cylinder { <0, -100, 0>, <0, 100, 0>, 17 rotate <0, 0, -45> translate <0, 0, -58> rotate <0, 270, 0> } texture { pigment { rgb <0.2, 0.2, 0.2> } normal { bumps -0.5 scale <1, 0.0001, 0.0001> } finish { specular 0.5 roughness 0.01 ambient 0.3 diffuse 0.7 } } } // Now the scene union { object { Table_Top } object { Leg } object { Rubber_Foot } object { Leg rotate <0, 90, 0> } object { Rubber_Foot rotate <0, 90, 0> } object { Leg rotate <0, 180, 0> } object { Rubber_Foot rotate <0, 180, 0> } object { Leg rotate <0, 270, 0> } object { Rubber_Foot rotate <0, 270, 0> } object { Aluminium_Joint translate <0, 353.5, 0> } object { Aluminium_Joint rotate <0, 0, 180> translate <0, 353.5, 0> } bounded_by { box { <-601, -1, -601> <601, 721, 601> } } } // Sky sphere union { sphere { <0, 0, 0>, 1 inverse translate <0, 1, 0> } plane { <0, 1, 0>, 0 } texture { pigment { gradient y // Fade from white to summer sky color_map { [0.0 0.2 color White color SummerSky ] [0.2 1.0 color SummerSky color SummerSky ] } } finish { ambient 0.3 diffuse 0.7 } } scale 10000 translate <0, -1, 0> } // end of file