// Persistence of Vision Ray Tracer Scene Description File // // File Name: reflector.pov // Description: photons media and mirrors // Date Started: 24 MAR 00 // Date Finished: 06 APR 00 // Author: Eric L. Freeman // Render Size: // AA: // SCENE SET-UP #declare AreaLite = 1; // 0=point lites, 1=area lites #declare CamNum = 2; // 1=straight-on, 2=angle #declare TextureQ = 1; // 0=low qual texture, 1=hi qual texture #declare PhotonsOn = 1; // 0=no photons/media, 1=photons/media #declare FadeLite = 1; // 0=normal lites, 1=fading lites #declare Loader = 0; // 0=make/save photon map, 1=load photon map #declare MediaOn = PhotonsOn; #if (PhotonsOn) #declare TargetNum = 1; #end global_settings { max_trace_level 167 #if (PhotonsOn) photons { count 4000 gather 20, 100 max_trace_level 167 autostop 0 jitter 0.4 expand_thresholds 0.2, 40 #if (MediaOn) media 100 #end //#if (Loader) load_file "reflector.ph" //#else save_file "reflector.ph" #end } #end //photonson } //global_settings #include "colors.inc" #declare LaserLiteColor = Maroon*15.3; #declare MediaFactor = 0.00125; #declare RoomPig = rgb <0.4219, 0.4805, 0.5430>*1.4; #declare MachinePig = rgb <0.60, 0.30, 0.15>; #declare CeilingPig = rgb <1.0000, 0.9800, 0.8430>*1.5; #declare ColorOne = rgb <0.5430, 0.0000, 0.5430>; #declare ColorTwo = rgb <1.0000, 0.9180, 0.8008>*1.5; #declare CheckSc = 6; #declare FloorPig = pigment { checker pigment { checker pigment {color ColorOne} pigment {color ColorTwo} scale sqrt(2)/2 rotate y*45 translate z/2 } pigment {color ColorTwo} } #declare HoleRad = 1.9; //1.5;******************** #declare MirrorTh = 1.6; #declare MirrorGap = 13.5; #declare MirrorRad = HoleRad*1.95; //1.02;******************* #declare MirrorStretch = sqrt(2); #declare MirrorMat = material { texture { pigment {White} finish { ambient 0 diffuse 0 reflection 1 brilliance 6 metallic // reflect_metallic } } } //mirrormat #if (TextureQ) #declare Amber = 0.125; #declare RoomMat = material { texture { pigment {RoomPig} finish { ambient 0.20 brilliance 2 diffuse 0.3 metallic reflection 0.045 } } interior {ior 20} } //roommat #declare FloorMat = material { texture { pigment {FloorPig scale CheckSc} finish { ambient 0.20 brilliance 2 diffuse 0.3 metallic // reflect_metallic // blinn 2.0 facets 0.28 reflection 0.15 } //finish } //texture interior {ior 20} } //floormat #declare CeilingMat = material { texture { pigment {CeilingPig} finish { ambient 0.20 brilliance 2 diffuse 0.3 metallic // reflect_metallic // blinn 0.5 facets 0.48 reflection 0.045 } //finish } //texture interior {ior 20} } //ceilingmat #declare MachineMat = material { texture { pigment {MachinePig} finish { ambient 0.20 brilliance 3 diffuse 0.4 metallic // reflect_metallic // blinn 2.3 facets 0.24 reflection 0.4 } //finish } //texture interior {ior 20} } //machinemat #else #declare RoomMat = material {texture {pigment {RoomPig}}} #declare FloorMat = material {texture {pigment {RoomPig}}} #declare CeilingMat = material {texture {pigment {CeilingPig}}} #declare MachineMat = material {texture {pigment {MachinePig}}} #end //if textureq #declare MainLiteTrans = <999900,0,0>; // THE ROOM // room variables #declare RoomX1 = 35; #declare RoomX2 = 90; #declare RoomY = 30; #declare RoomZ1 = -72; #declare RoomZ2 = 30; // the room #declare TheRoom = union { box { // the floor <-RoomX1,-RoomY-0.0001,RoomZ1>, material {FloorMat} } box { // the ceiling <-RoomX1,RoomY,RoomZ1>, material {CeilingMat} } difference { box { // room box <-RoomX1-0.1,-RoomY-0.1,RoomZ1+0.1>, <(RoomX2)+1.1,RoomY+0.1,RoomZ2+0.1> } box { // room cut-out <-RoomX1,-RoomY-0.0001,RoomZ1>, } cylinder { // laser hole , HoleRad } material {RoomMat} } } //theroom // MEDIA BOX #if (MediaOn) box { <-RoomX1+0.001,-RoomY+0.001,-HoleRad*2>, <999990,RoomY-0.001,HoleRad*2> pigment {rgbf 1.0} hollow interior { ior 1 media { intervals 3 //10 samples 1, 1 //1,1 confidence 0.995 //higher=better 0.9 variance 1/256 //lower=better 1/128 scattering { 1, //1-5 LaserLiteColor*MediaFactor extinction 0 } } //media } //interior } //media box #end //if mediaon // MIRROR #macro BuildMirror (StemLen) //variables #declare MirrorTh = 1.6; #declare MirrorRad = HoleRad*1.95; //1.02;*********************** #declare MountRad = HoleRad*3.6; //2.5;************************* #declare MirrorStretch = sqrt(2); #declare MirrorMat = material { texture { pigment {White} finish { ambient 0 diffuse 0 reflection 1 brilliance 6 metallic // reflect_metallic } //finish } //texture } //mirrormat // textures #declare MirrorUnit = cylinder { //mirror surface <-MirrorTh*0.5,0,0>, <0,0,0> MirrorRad scale <1,MirrorStretch,1> material {MirrorMat} #if (PhotonsOn) photons { target TargetNum refraction off reflection on } #end //if photonson rotate z*45 translate <0,StemLen,0> } #declare MirrorFrame = difference { // rim cylinder { <-MirrorTh,0,0>, <0,0,0> MirrorRad+(MirrorTh*0.75) } cylinder { <-MirrorTh*0.51,0,0>, <0.01,0,0> MirrorRad+0.00001 } scale <1,MirrorStretch,1> rotate z*45 translate <0,StemLen,0> } //mirrorframe #declare Stand = difference { cylinder { <0,0.0001,0>, <0,StemLen+MirrorRad,0> MirrorRad*0.35 } box { <-MirrorRad*4,-0.001,-MirrorRad*4>, rotate z*-45 translate <0,StemLen,0> } } //stand #declare Mount = cylinder { <0,0.1,0>, <0,MirrorTh+0.1,0> MountRad } #declare FrameUnit = union { object {MirrorFrame} object {Stand} object {Mount} material {MachineMat} } #declare AMirror = union { object {MirrorUnit} object {FrameUnit} } #end //macro buildmirror // mirror one #declare MirrorX = MirrorGap*1.5; #declare MirrorY = RoomY; #declare MirrorZ = 0; BuildMirror (MirrorY) #declare MirrorOne = object { AMirror translate } // mirror two #declare MirrorX = MirrorX; #declare MirrorY = 12; #declare MirrorZ = MirrorZ; BuildMirror (MirrorY) #declare MirrorTwo = object { AMirror rotate x*180 rotate y*180 translate } #declare Mover = 20; // mirror three #declare MirrorX = MirrorX-Mover; #declare MirrorY = MirrorY; #declare MirrorZ = MirrorZ; BuildMirror (MirrorY) #declare MirrorThree = object { AMirror rotate x*180 translate } // mirror four #declare MirrorX = MirrorX; #declare MirrorY = MirrorY; #declare MirrorZ = MirrorZ; BuildMirror (MirrorY) #declare MirrorFour = object { AMirror rotate y*180 translate } // mirror five #declare MirrorX = MirrorX-Mover; #declare MirrorY = MirrorY; #declare MirrorZ = MirrorZ; BuildMirror (MirrorY) #declare MirrorFive = object { AMirror translate } // mirror six #declare MirrorX = MirrorX; #declare MirrorY = 29; #declare MirrorZ = MirrorZ; BuildMirror (MirrorY) #declare MirrorSix = object { AMirror rotate x*180 rotate y*180 translate } #declare Catcher = object { Mount material {MachineMat} rotate z*-90 translate <-RoomX1,RoomY-MirrorY,0> } // LASER GUN #declare LaserX1 = 40; #declare LaserX2 = LaserX1+40; #declare HandleX1 = LaserX1+25; #declare HandleX2 = LaserX1+27; #declare HandleAngle = 50; #declare BarrelRing = union { cylinder { , HoleRad*2 } torus { HoleRad*2, 0.5 sturm rotate x*90 rotate y*90 translate } } //barrelring #declare LaserGun = union { difference { union { cylinder { , HoleRad*1.6 } torus { HoleRad*1.3, HoleRad*0.3 sturm rotate z*90 translate } object {BarrelRing} object {BarrelRing translate <4,0,0>} object {BarrelRing translate <8,0,0>} sphere {, HoleRad*4} // scuba tank difference { cylinder { // scuba tank , HoleRad*4 } difference { // handle cut-out cylinder { , HoleRad*4.1 } cylinder { , HoleRad*2 } box { , rotate x*HandleAngle } box { , rotate x*-HandleAngle } } } cylinder { // handle stick <(HandleX1+HandleX2)/2,0,0>, <(HandleX1+HandleX2)/2,HoleRad*7,0> (HandleX2-HandleX1)/2 rotate x*-HandleAngle } difference { // stand box { , } cylinder { , 20 } } box { // base , } } cylinder { , HoleRad } material {MachineMat} } text { ttf "c:\windows\fonts\arialbd.ttf" "ACME" 1, 0 // align_center scale 4.5 pigment {White} translate <66,-14,-0.7> } text { ttf "c:\windows\fonts\arialbd.ttf" "Laser Co." 1, 0 // align_center scale 3.2 pigment {White} translate <66,-19,-0.7> } union { // handle tip cylinder { <(HandleX1+HandleX2)/2,HoleRad*7,0>, <(HandleX1+HandleX2)/2,HoleRad*8.5,0> (HandleX2-HandleX1)*0.7 } sphere { <(HandleX1+HandleX2)/2,HoleRad*8.5,0>, (HandleX2-HandleX1)*0.7 } material { texture {pigment {rgb <1.0000, 0.1875, 0.1875>}} interior {ior 20} } rotate x*-HandleAngle } } //lasergun // camera variables #switch (CamNum) #case (1) #declare CamPosX = 21; #declare CamPosY = 0; #declare CamPosZ = -RoomZ-14; #declare CamLookX = CamPosX; #declare CamLookY = 0; #declare CamLookZ = 0; // #declare CamAngle = 70; #break #case (2) #declare CamPosX = 31; #declare CamPosY = 10; #declare CamPosZ = RoomZ1-13; #declare CamLookX = CamPosX-9.24; #declare CamLookY = 0; #declare CamLookZ = 0; #declare CamAngle = 69.5; #break #end // camera ##declare CamPos = ; ##declare CamLook = ; camera { location CamPos look_at CamLook angle CamAngle } // LIGHTS // secondary lite #switch (CamNum) #case (1) light_source { CamPos, White*0.37 media_interaction off photons { refraction off reflection on } } #break #case (2) #declare LiteZ = -45; #declare FDist = -LiteZ*0.7; #declare FPower = 2; #declare ASize = -LiteZ*0.12; #declare ANum = 4; light_source { // left lite 0, White*0.5 #if (AreaLite) area_light <0,ASize,0> ANum,ANum adaptive 4 // 0,1,2,3... jitter circular #end #if (FadeLite) fade_distance FDist fade_power FPower #end media_interaction off photons { refraction off reflection on } translate <0,0,LiteZ> rotate x*05 rotate y*35 } light_source { // rite lite 0, White*1.0 #if (AreaLite) area_light <0,ASize,0> ANum,ANum adaptive 4 // 0,1,2,3... jitter circular #end #if (FadeLite) fade_distance FDist fade_power FPower #end media_interaction off photons { refraction off reflection on } translate <0,0,LiteZ> rotate x*14 rotate y*-20 translate <34,0,0> } #break #end // laser lite light_source { MainLiteTrans, LaserLiteColor media_attenuation on photons { refraction off reflection on } } // PLACE OBJECTS background {RoomPig*0.25} object {TheRoom} object {MirrorOne} object {MirrorTwo} object {MirrorThree} object {MirrorFour} object {MirrorFive} object {MirrorSix} object {Catcher} object {LaserGun}