/**********************************************************************************/ /* StairCaseDoc.pov - Created by Chris Bartlett April 2006 */ /* */ /* You may re-use this file in original or modified form with or without credit */ /* being given to the original author. You may redistribute on any form of media. */ /* */ /* Description: This scene file is used to generate the images used in the */ /* documentation to illustrate the use of the StairCase.inc file. */ /* Version: Written using POV-Ray 3.5 and tested on 3.6 */ /* */ /* Use command line options +kfi0 +kff50 */ /**********************************************************************************/ //#declare ImageNumber = 1; // 1 to 50 if only generating a single image #declare ImageNumber = frame_number; // used for generating a sequence of images #version 3.5; #include "StairCase.inc" #if (ImageNumber = 0) #fopen FileID "RenameImages.bat" write #else #fopen FileID "RenameImages.bat" append #end #declare SimpleLight = light_source { <3, 14,-10> color rgb 1.35 } // An area light #declare AreaLight = light_source {0 color rgb 1.2 area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <60, 80,-70> // position of light } // An area light #declare AreaLight2 = light_source {0 color rgb 1.2 area_light <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z) 4, 4 // total number of lights in grid (4x*4z = 16 lights) adaptive 0 // 0,1,2,3... jitter // adds random softening of light circular // make the shape of the light circular orient // orient light translate <20, 90,-20> // position of light } #declare Image = ""; #if (ImageNumber = 1) #declare Image = "Example1"; camera {location <4,2,-2> look_at <0,1.75,2>} light_source {AreaLight} #include "staircase.inc" #declare SCPostPositions = array [3] {<0,0,0>,<0,2,2.5>,<-2.5,4,2.5>}; StairCase() #end #if (ImageNumber = 2) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #include "staircase.inc" #declare SCPostPositions = array [2] {<0,0,0>,<0,2,2.5>}; StairCase() #declare SCPostPositions = array [2] {<0,2,2.5>,<-2.5,4,2.5>}; StairCase() #declare SCPostPositions = array [2] {<1,2,3.5>,< 3.5,4,3.5>}; StairCase() #end #if (ImageNumber = 3) #declare Image = "SCDefaultNewelTexture"; camera {location <1.45,0.5,-0.1> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 4) #declare Image = "SCNewelTexture"; camera {location <1.45,0.5,-0.1> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" #declare SCNewelTexture = texture {pigment {color rgb <1,0,0>}}; StairCase() #end #if (ImageNumber = 5) #declare Image = "SCDefaultBalusterTexture"; camera {location <1.45,0.75,0.22> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 6) #declare Image = "SCBalusterTexture"; camera {location <1.45,0.75,0.22> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" #declare SCBalusterTexture = texture {pigment {color rgb <0,1,0>}}; StairCase() #end #if (ImageNumber = 7) #declare Image = "SCDefaultStringerTexture"; camera {location <1.45,-0.1,0.4> look_at <0,1.2,1.2>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 8) #declare Image = "SCStringerTexture"; camera {location <1.45,-0.1,0.4> look_at <0,1.2,1.2>} light_source {AreaLight} #include "StairCase.inc" #include "textures.inc" #declare SCStringerTexture = texture {Cherry_Wood translate <-1,-1,0> translate -y scale <0.1,0.015,0.1>} StairCase() #end #if (ImageNumber = 9) #declare Image = "SCDefaultRailTexture"; camera {location <1.35,1.4,0.5> look_at <0,1.2,0.5>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 10) #declare Image = "SCRailTexture"; camera {location <1.35,1.4,0.5> look_at <0,1.2,0.5>} light_source {AreaLight} #include "StairCase.inc" #declare SCRailTexture = texture {pigment {color rgb <1,0,1>}}; StairCase() #end #if (ImageNumber = 11) #declare Image = "SCDefaultTreadTexture"; camera {location <0.95,1.5,1.9> look_at <0.1,0,1>} light_source {AreaLight2} #include "StairCase.inc" #declare SCStairCarpetOn=0; StairCase() #end // #declare SCTreadTexture = texture {Sandalwood rotate y*90 scale <0.1,0.1,0.005>} // #declare SCTreadTexture = texture {DMFWood6 translate -y rotate y*90 scale <0.1,0.1,0.04>} // #declare SCTreadTexture = texture {White_Wood rotate y*90 translate -y*1 scale <0.1,0.1,0.015>} // #declare SCTreadTexture = texture {Pine_Wood rotate y*90 translate -y*1 scale <0.01,0.01,0.0025>} // #declare SCTreadTexture = texture {Red_Marble rotate y*90 scale <0.08,0.08,0.01>} // #declare SCTreadTexture = texture {pigment {color rgb <1,1,1>}}; #if (ImageNumber = 12) #declare Image = "SCTreadTexture"; camera {location <0.95,1.5,1.9> look_at <0.1,0,1>} light_source {AreaLight2} #include "StairCase.inc" #include "textures.inc" #declare SCTreadTexture = texture {Cherry_Wood translate <-1,-1,0> rotate y*90 translate -y scale <0.1,0.1,0.008>} #declare SCStairCarpetOn=0; StairCase() #end #if (ImageNumber = 13) #declare Image = "SCDefaultRiserTexture"; camera {location <0.5,0.3,0> look_at <0.5,0.5,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCStairCarpetOn=0; StairCase() #end #if (ImageNumber = 14) #declare Image = "SCRiserTexture"; camera {location <0.5,0.3,0> look_at <0.5,0.5,1>} light_source {AreaLight} #include "StairCase.inc" #include "textures.inc" #declare SCRiserTexture = texture {Sandalwood scale <0.1,0.005,0.1>} #declare SCStairCarpetOn=0; StairCase() #end #if (ImageNumber = 15) #declare Image = "SCDefaultStairCarpetTexture"; camera {location <0.85,0.75,0> look_at <0.35,0.5,1>} light_source {SimpleLight} #include "StairCase.inc" #declare SCStairCarpetWidth = 0.75; StairCase() #end #if (ImageNumber = 16) #declare Image = "SCStairCarpetTexture"; camera {location <0.85,0.75,0> look_at <0.35,0.5,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCStairCarpetTexture = texture {pigment {color rgb <1,1,1>}}; #declare SCStairCarpetWidth = 0.75; StairCase() #end #if (ImageNumber = 17) #declare Image = "SCDefaultStairCarpetColour"; camera {location <0.85,0.75,0> look_at <0.35,0.5,1>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 18) #declare Image = "SCStairCarpetColour"; camera {location <0.85,0.75,0> look_at <0.35,0.5,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCStairCarpetColour = <0,1,0>; StairCase() #end // *********** ERROR *********** paired Bannister rails don't appear properly #if (ImageNumber = 19) #declare Image = "SCStairsOn"; camera {location <5,5,1> look_at <-0.5,2,1.2>} light_source {AreaLight} #include "StairCase.inc" #background {1} #declare SCStairsOn = 0; StairCase() #end // ***************** #if (ImageNumber = 20) #declare Image = "SCLandingsOn"; camera {location <2,6,2.5> look_at <-0.5,2,2.5>} light_source {AreaLight2} #include "StairCase.inc" #declare SCLandingsOn = 0; StairCase() #end #if (ImageNumber = 21) #declare Image = "SCStairCarpetOn"; camera {location <0.85,0.75,0> look_at <0.35,0.5,1>} light_source {AreaLight2} #include "StairCase.inc" #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 22) #declare Image = "SCMainBanisterOn"; camera {location <4,5,-3> look_at <-2,1.5,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCMainBanisterOn = 0; StairCase() #end #if (ImageNumber = 23) #declare Image = "SCPairedBanisterOn"; camera {location <4,5,-3> look_at <-2,1.5,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCPairedBanisterOn = 0; StairCase() #end #if (ImageNumber = 24) #declare Image = "SCMaxBalusterSpacing"; camera {location <2,1.65,0.4> look_at <0,1.6,1.5>} light_source {AreaLight} #include "StairCase.inc" #declare SCMaxBalusterSpacing = 0.08; StairCase() #end #if (ImageNumber = 25) #declare Image = "SCMaxBalusterSpacing2"; camera {location <2,1.65,0.4> look_at <0,1.6,1.5>} light_source {AreaLight} #include "StairCase.inc" #declare SCMaxBalusterSpacing = 0.25; StairCase() #end #if (ImageNumber = 26) #declare Image = "SCMaxRiserHeight"; camera {location <1.5,0.45,-0.5> look_at <0,0.75,1>} light_source {AreaLight} #include "StairCase.inc" #declare SCMaxRiserHeight = 0.10; StairCase() #end #if (ImageNumber = 27) #declare Image = "SCRiserCoverage"; camera {location <1.5,0.45,-0.5> look_at <0,0.75,1>} light_source {AreaLight} background {rgb <1,1,1>} #include "StairCase.inc" #declare SCRiserCoverage = 0.5; #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 28) #declare Image = "SCStairWidth"; camera {location <3,3,-4> look_at <1.4,1,3.5>} light_source {AreaLight} #include "StairCase.inc" #declare SCStairWidth = 4; StairCase() #end #if (ImageNumber = 29) #declare Image = "SCStairHandedness"; camera {location <-2,3,-2> look_at <1,1,1.5>} light_source {AreaLight translate -100*x} #include "StairCase.inc" #declare SCStairHandedness = -1; #declare SCPostPositions = array [3] {<1,0,0>,<1,1,1.25>,<2.25,2,1.25>}; StairCase() #end #if (ImageNumber = 30) #declare Image = "SCLandingThreshold"; camera {location <0.75,4,1> look_at <0.75,2,1.5>} light_source {AreaLight2} #include "StairCase.inc" #declare SCLandingThreshold = 30; #declare SCPostPositions = array [3] {<0,0,0>,<0,1,1.25>,<-0.75,2,2.5>}; StairCase() #end #if (ImageNumber = 31) #declare Image = "SCLandingThreshold2"; camera {location <0.75,4,1> look_at <0.75,2,1.5>} light_source {AreaLight2} #include "StairCase.inc" #declare SCLandingThreshold = 40; #declare SCPostPositions = array [3] {<0,0,0>,<0,1,1.25>,<-0.75,2,2.5>}; StairCase() #end #if (ImageNumber = 32) #declare Image = "SCStairCarpetWidth"; camera {location <0.9,1,-0.5> look_at <0,0.5,1.5>} light_source {SimpleLight} #include "StairCase.inc" #declare SCStairCarpetWidth = 0.5; StairCase() #end #if (ImageNumber = 33) #declare Image = "SCDefaultStringer"; camera {location <1.45,0.4,0.4> look_at <0,1.2,1.2>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 34) #declare Image = "SCStringer"; camera {location <1.45,0.4,0.4> look_at <0,1.2,1.2>} light_source {AreaLight} #include "StairCase.inc" #declare SCStringer = box {<-0.03,-0.14,-0.08><0.03,0.12,1.08>}; StairCase() #end #if (ImageNumber = 35) #declare Image = "SCDefaultTread"; camera {location <0.9,0.6,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 36) #declare Image = "SCTread"; camera {location <0.9,0.6,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" #declare SCTread = box {<-0.5,-0.042,-1><0.5,0,0.15>}; #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 37) #declare Image = "SCDefaultRiser"; camera {location <0.9,0.6,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 38) #declare Image = "SCRiser"; camera {location <0.9,0.6,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" #declare SCRiser = difference { box {<-0.5,-1,0.120><0.5,-0.001,0.128>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate <-0.25,-0.55,0>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate < 0 ,-0.55,0>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate < 0.25,-0.55,0>} } #declare SCStairCarpetOn = 0; StairCase() #end #if (ImageNumber = 39) #declare Image = "SCDefaultStairCarpet"; camera {location <0.8,0.8,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 40) #declare Image = "SCStairCarpet"; camera {location <0.8,0.8,0.5> look_at <0.5,0.55,0.8>} light_source {AreaLight2 translate -z*40} #include "StairCase.inc" #declare SCStairCarpet = box {<-0.4,0,-0.1><0.4,0.001,0.10>}; StairCase() #end #if (ImageNumber = 41) #declare Image = "SCDefaultHandRail"; camera {location <1.35,1.4,0.5> look_at <0,1.2,0.5>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 42) #declare Image = "SCHandRail"; camera {location <1.35,1.4,0.5> look_at <0,1.2,0.5>} light_source {AreaLight} #include "StairCase.inc" #declare SCHandRail = cylinder {<0,0.015,0><0,0.015,1>,0.03 clipped_by {plane {-y,0}} scale y*0.6 }; StairCase() #end #if (ImageNumber = 43) #declare Image = "SCDefaultBaluster"; camera {location <1.45,0.75,0.22> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 44) #declare Image = "SCBaluster"; camera {location <1.45,0.75,0.22> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" #declare SCBaluster = box {<-0.015,-0.03,-0.015><0.015,1,0.015>}; StairCase() #end #if (ImageNumber = 45) #declare Image = "SCDefaultNewelPost"; camera {location <1.45,1.2,-0.1> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" StairCase() #end #if (ImageNumber = 46) #declare Image = "SCNewelPost"; camera {location <1.35,1.1,-0.15> look_at <0,0.5,0>} light_source {AreaLight} #include "StairCase.inc" #declare SCNewelPost = intersection { box {<-0.042,-1,-0.042><0.042,1.02,0.042>} plane {<0,1,1>,0 translate 1.05*y} plane {<0,1,1>,0 translate 1.05*y rotate 90*y} plane {<0,1,1>,0 translate 1.05*y rotate 180*y} plane {<0,1,1>,0 translate 1.05*y rotate 270*y} } StairCase() #end #if (ImageNumber = 47) #declare Image = "Example3"; light_source {AreaLight2 translate -z*20} camera {location <-6,5.2,2> look_at <0,0,1.2>} #include "StairCase.inc" #declare SCStairsOn = 1; #declare SCStairWidth = 1.5; #declare SCStairCarpetWidth = 1.2; #declare SCPostPositions = array [6] {<0,2,0>,<0,1,3>,<-1,1,3>,<-2,0,2>,<-2,0,1>,<-2,-1,-2>}; StairCase() #end #if (ImageNumber = 48) #declare Image = "Example4"; light_source {AreaLight2} camera {location <0,3,-5> look_at <0,0,0>} #include "StairCase.inc" #declare SCPostPositions = array [6] {<-3,0,0>,<-2,0,0>,<-1,-1,0>,<1,-1,0>,<2,0,0>,<3,0,0>}; StairCase() #end #if (ImageNumber = 49) #declare Image = "Example5"; light_source {AreaLight2} camera {location <0,3,-5> look_at <0,0,0>} #include "StairCase.inc" #declare SCPairedBanisterOn = 0; #declare SCPostPositions = array [6] {<-3,0,0>,<-2,0,0>,<-1,-1,0>,<1,-1,0>,<2,0,0>,<3,0,0>}; StairCase() #declare SCPairedBanisterOn = 1; #declare SCMainBanisterOn = 0; #declare SCStairsOn = 0; #declare SCPostPositions = array [3] {<-3,0,0>,<-2,0,0>,<-1,-1,0>}; StairCase() #declare SCPostPositions = array [3] {<1,-1,0>,<2,0,0>,<3,0,0>}; StairCase() #declare SCMainBanisterOn = 1; #declare SCStairsOn = 1; #declare SCStairWidth=2; #declare SCPostPositions = array [2] {<-1,-1.5,-1.65>,<-1,-1,-1>}; StairCase() #end #if (ImageNumber = 50) #declare Image = "Banner1"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight translate <-10,-20,40>} camera {location <3,4,-5> look_at <0,2,0>} #declare SCStairCarpetColour = <0,1,0>; #declare SCPostPositions = array [9] {<0,-1,-3.75>,<0,1,1.25>,<0,1,2.25>,<0,0,4.5>,<-5,4,6.5>,<-8,4,4.5>,<-7,3,3>,<-2,-1,2>,<10,-1,2>}; #declare SCStairWidth=2; #declare SCStairCarpetWidth=1.6; StairCase() #end #if (ImageNumber = 51) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 52) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 53) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 54) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 55) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 56) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 57) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 58) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber = 59) #declare Image = "Example2"; camera {location <5,3,-4> look_at <0,2,3.5>} light_source {AreaLight} #end #if (ImageNumber != 0) #if (frame_number = 0) #write(FileID,"REN StairCaseDoc.bmp ",Image,".bmp \n") #else #write(FileID,"REN StairCaseDoc",ImageNumber,".bmp ",Image,".bmp \n") #end #end //#fclose FileID