/************************************************** * Lighthouse By Dakota Huene * * for Mr. Meinzen's 2nd Hour Special Topics class * * 4/11/2011 * **************************************************/ //This block of code includes all the necessary include files needed to render the image #include "shapes.inc" #include "colors.inc" #include "textures.inc" #include "skies.inc" #include "metals.inc" #include "woods.inc" #include "finish.inc" /** * This is the camera, set to look at a static position */ camera { location <0,3,15> look_at <0,0,0> } /** * The fog method adds a black haze in the distance * that makes the horizon look prettier */ fog { fog_type 2 distance 100 color Black fog_offset 0.1 fog_alt 10 turbulence 1.8 } /** * This is a hollow, invisible sphere that contains fog; * It is what makes the light beam from the lighthouse visible */ sphere { <-4,4.5,-2> 30 hollow pigment { color rgbt 1 } interior { media { scattering{ 4, .17 extinction .0001} } } } /** * The bottom part of the lighthouse */ cylinder { <-4,0,-2> <-4,4,-2> 1 texture { Candy_Cane } } /** * The glass part of the lighthouse */ cylinder { <-4,4,-2> <-4,5,-2> 1 texture { Green_Glass finish { ambient 0.5 } } } /** * This is the actual light beam, set to point at a location defined * by a clock used in an ini file. The ini file and clock are what make this * image animated. */ light_source { 0*x color rgb .5 spotlight translate <-4,4.5,-2> point_at radius 20 tightness 80 falloff 30 } /** * The top of the lighthouse */ cylinder { <-4,5,-2> <-4,6,-2> 1 hollow texture { Candy_Cane } } /** * This hollow sphere is what makes the night sky and stars. */ sphere { <0,0,0> 1 hollow texture { Starfield } scale 10000 } /** * This is what makes the island that the lighhouse sits on */ height_field { png "heightmapisland.png" smooth water_level 0.1 texture { pigment { color Green } } scale <20,2,20> translate <-10, -1 , -10> } /** * This is the water that also uses the clock to give * the appearance of waves and a tide. */ plane { y, 0 texture { Polished_Chrome normal { bozo 1.75 scale <2.0,1,0.3>*0.20 rotate<0,sin(clock)*10,0> turbulence 0.9 translate<0,0,clock/10> } finish { ambient 0.15 diffuse 0.85 reflection 0.35 } } translate<0,(sin(clock)/5), 0> }