// Persistence of Vision Ray Tracer Scene Description File // // File Name: reflector.pov // Version: MegaPOV 0.4 // Description: photons media and mirrors // Date Started: 24 MAR 00 // Date Finished: 06 APR 00 // Author: Eric L. Freeman // Render Size: // AA: // Miscelanous: Possible v.0.5 Demo // SCENE SET-UP #declare TextureQ = 1; // 0=low qual texture, 1=hi qual texture #declare PhotonsOn = 1; // 0=no photons/media, 1=photons/media #declare AreaLite = 1; // 0=point lites, 1=area lites #declare CamNum = 2; // 1=straight-on, 2=angle #declare Loader = 1; // 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.5; #declare MirrorTh = 1.6; #declare MirrorGap = 13.5; #declare MirrorRad = HoleRad*1.95; #declare MirrorStretch = sqrt(2); #declare MirrorMat = material { texture { pigment {White} finish { ambient 0 diffuse 0 reflection 1 brilliance 6 metallic //reflect_metallic } } } //mirrormat #declare RoomMat = material {texture {pigment {RoomPig}}} #declare FloorMat = material {texture {pigment {RoomPig}}} #declare CeilingMat = material {texture {pigment {CeilingPig}}} #declare MachineMat = material {texture {pigment {MachinePig}}} #declare MainLiteTrans = <999900,0,0>; // THE ROOM // room variables #declare RoomX1 = 35; #declare RoomX2 = 90; #declare RoomY = 30; #declare RoomZ1 = -72; #declare RoomZ2 = 30; //theroom 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 scale 10 } //media box // MIRROR #macro BuildMirror (StemLen) //variables #declare MirrorTh = 1.6; #declare MirrorRad = HoleRad*1.95; #declare MountRad = HoleRad*3.6; #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> } // 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 // laser lite light_source { <150,0,0>, color rgb <0,1,0> *15*100 spotlight //cylinder point_at 0 radius 1/2 falloff 1/2 tightness 100 media_attenuation off photons { refraction off reflection on } } // PLACE OBJECTS background {RoomPig*0.25} object {MirrorOne} object {MirrorTwo} object {MirrorThree} object {MirrorFour} object {MirrorFive} object {MirrorSix} object {Catcher} /* // create a regular point light source light_source { 0*x // light's position (translated below) color rgb <1,0,1>*.1 // light's color translate <-20, 40, 20>*.5 } */