// Persistence Of Vision raytracer version 3.0 file. // Copyright 1998 David J. Biesack // biesack@mindspring.com // http://biesack.home.mindspring.com // GEBEGB - inspired by the cover of Douglas R. Hofstadter's book, // Go:del Escher and Bach: an Eternal Golden Braid #version 3.6 #include "colors.inc" #include "textures.inc" #include "woods.inc" #include "stones.inc" #include "rad_def.inc" global_settings { max_trace_level 12 ambient_light color White radiosity { Rad_Settings(Radiosity_Final, off, off) } photons { spacing 0.02 max_trace_level 5 } } #declare Offset = 3.5; // Define letters with CSF instead of fonts/text objects; // I can't find a font that is really just right, and the chars // in chars.inc just don't cut it [pun intended] #declare delta = 0.001; // ensure overlap #declare Size = 1; #declare Goffset = Size/6; // 0.5 - 1/3 #declare oneSixth = (1/6+delta); #declare Width = 1/3; #declare BackWall = 4*Size; #declare SideWall = -3*Size; #declare Floor = -4*Size; #declare Right = 2.5*Size; // background walls, floor plane { x, SideWall texture { T_Stone15 scale 3 } } // left wall plane { z, BackWall texture { T_Stone15 scale 3 } } // back wall plane { y, Floor texture { T_Stone32 scale 3 } } // floor // decorative corner tratments #declare Corner_Sphere_Size = 0.5; #declare Corner_Sphere_Offset = Corner_Sphere_Size / 2; #declare Corner = ; #declare BorderTexture = texture { Polished_Brass } // texture { T_Stone29 scale 4*Scale } sphere { Corner Corner_Sphere_Size texture { BorderTexture } } cylinder { Corner Corner_Sphere_Offset texture { BorderTexture } } cylinder { Corner Corner_Sphere_Offset texture { BorderTexture } } cylinder { Corner Corner_Sphere_Offset texture { BorderTexture } } // define letters centered at <0,0,0> for easier rotation // this one's trivial... #declare letter_E = union { box { < 0, 0, 0> <0.2, 1, 1> } // left vertical box { <0.1, 0, 0> <1, 0.2, 1> } // bottom horizontal box { <0.1, 0.4, 0> <0.8,0.6, 1> } // center horizontal box { <0.1, 0.82, 0> <1, 1.0, 1> } // top horizontal translate <-.5, -.5, -.5> } #declare quarterTurn = intersection { difference { cylinder { <0,0,0-delta>, <0,0,1+delta>, Width } cylinder { <0,0,-.1>, <0,0,1.1>, Width - 0.2 } } plane { x, 0 } plane { -y, 0 } } // G: four quarter turns, three rectilinear connectors, and a cross bar #declare letter_G = union { object { quarterTurn translate <-Goffset, Goffset, 0> } // top left object { quarterTurn rotate 90*z translate <-Goffset, -Goffset, 0> } // bottom left object { quarterTurn rotate -90*z translate < Goffset, Goffset, 0> } // top right object { quarterTurn rotate 180*z translate < Goffset, -Goffset, 0> } // bottom right box { <-oneSixth, .3, 0>, } // top box { <-oneSixth, -.3, 0>, } // bottom box { < -.5, -oneSixth, 0>, <-.3, oneSixth, 1> } // left box { < .1, -oneSixth, 0>, < .5, .2-1/6, 1> } // right horizontal bar scale 1.01 translate <0,0,-.5> } // another simple letter. #declare half_B = difference { union { box { <0, 0, 0>, <.7+delta, .6, 1> } cylinder { <.7, .3, 0>, <.7, .3, 1>, .3 } } union { box { <.3, .2, -.1>, <.7+delta, .4, 1.1> } cylinder { <.7, .3, -.1>, <.7,.3, 1.1>, .1 } } } #declare letter_B = union { object { half_B } object { half_B translate .4*y } scale 1.005 translate <-.5, -.5, -.5> } // Top trip-let intersection { object { letter_G rotate -90*y } // left wall object { letter_E } // back wall object { letter_B rotate 90*x } // floor texture { T_Wood13 rotate <90,30,45> scale 0.25 } scale 2 translate Offset*y } // Bottom trip-let intersection { object { letter_E rotate -90*y } // left wall object { letter_G } // back wall object { letter_B rotate 90*x } // floor texture { T_Wood13 rotate <90,30,45> scale 0.25 } scale 2 } #declare L_Len = 2; #declare L_Width = 2; #declare L_Count = 8; #declare L_Falloff = 40; #declare L_Radius = 10; #declare L_Tightness = 25; #declare L_Distance = 50; // light shining from top light_source { <0, L_Distance, 0> color White cylinder radius L_Radius tightness L_Tightness falloff L_Falloff area_light x*L_Len, z*L_Width, L_Count, L_Count adaptive 1 // fade_distance L_Fade_Distance fade_power L_Fade_Power point_at <0,0, 0> } // light shining from right, bottom triplet light_source { color White cylinder radius L_Radius tightness L_Tightness falloff L_Falloff area_light y*L_Len, z*L_Width, L_Count, L_Count adaptive 1 // fade_distance L_Fade_Distance fade_power L_Fade_Power point_at <0,0,0> } // Second light shining from right, top triplet light_source { color White cylinder radius L_Radius tightness L_Tightness falloff L_Falloff area_light y*L_Len, z*L_Width, L_Count, L_Count adaptive 1 // fade_distance L_Fade_Distance fade_power L_Fade_Power point_at <0,Offset + 0, 0> } // light shining from front, bottom triplet light_source { <0, 0, -L_Distance> color White cylinder radius L_Radius tightness L_Tightness falloff L_Falloff area_light x*L_Len, y*L_Width, L_Count, L_Count adaptive 1 // fade_distance L_Fade_Distance fade_power L_Fade_Power point_at <0,0,0> } // second light shining from front, top triplet light_source { <0, Offset + 0, -L_Distance> color White cylinder radius L_Radius tightness L_Tightness falloff L_Falloff area_light x*L_Len, y*L_Width, L_Count, L_Count adaptive 1 // fade_distance L_Fade_Distance fade_power L_Fade_Power point_at <0, Offset + 0,0> } #declare Sky = sphere { <0, 0, 0>, 1 hollow texture { pigment { gradient y color_map { [ 0.5 color rgb <0.0, 0.0, 0.5> ] [ 1.0 color rgb <1.0, 1.0, 1.0>*0.7 ] } } finish { ambient color White diffuse 0.6 specular 0 } scale <1, 2, 1> translate <0, -1, 0> } scale <1, 1, 1>*500 } camera { location <5.4, 6.5, -5.4> up <0,1,0> right <1,0,0> // adjust for square aspect ratio look_at <0, 1.2, 0> //aperture 0.25 // [0...N] larger is narrower depth of field (blurrier) //blur_samples 10 // number of rays per pixel for sampling //focal_point // point that is in focus //confidence 0.95 // [0...<1] when to move on while sampling (smaller is less accurate) //variance 1/200 // [0...1] how precise to calculate (smaller is more accurate) } // See options in gebegb.ini // Local Variables: // compile-command: "start e:\\povray\\bin\\pvengine e:\\povray\\djb\\gebegb.ini" // End: