// Persistence of Vision Ray Tracer Scene Description File // // File Name: reflector.pov // Version: MegaPOV 0.4 // Description: light and mirrors // Date Started: 24 MAR 00 // Date Finished: // Author: Eric L. Freeman // Render Size: // AA: 0.05 // Miscelanous: // SCENE SET-UP #version unofficial MegaPov 0.4; $ TextureQ = 1; $ MediaOn = 1; // 0=no media, 1=media $PhotonsOn = 1; // 0=no photons, 1=photons $ Loader = 0; // 0=generate photon map, 1=load photon map #if (PhotonsOn) $ TargetNum = 1; #end global_settings { max_trace_level 167 #if (PhotonsOn) photons { count 5000 gather 20, 100 // do not change max_trace_level 167 // do not change autostop 0 jitter 0.4 // do not change expand_thresholds 0.2, 40 #if (MediaOn) media 100 #end #if (Loader) load_file "reflector.ph" #else save_file "reflector.ph" #end } #end } #include "kolors.inc" #include "colors.inc" #include "mega_metals.inc" // GLOBAL VARIABLES $LiteColor = RubyRed;//IndianRed5*1.2; $LaserFactor = 0.1; $HoleRad = 1.9; $MirrorTh = 0.8; $MirrorGap = 13.5; $MirrorRad = HoleRad+0.1; $MirrorStretch = sqrt(2); $Amber = 0.125; $MirrorMat = material { texture { pigment {White} finish { ambient 0 diffuse 0 reflection 1 brilliance 6 metallic reflect_metallic } } } #if (TextureQ) $FrameMat = material { texture { pigment {CoolCopper} finish {Mega_F_MetalC} } interior {ior 20} } $LaserMat = material { texture { pigment {DodgerBlue3} finish {Mega_F_MetalB} } interior {ior 20} } #else $FrameMat = material { texture {pigment {CoolCopper}} } $LaserMat = material { texture {pigment {DodgerBlue3}} } #end $MainLiteTrans = <999900,0,0>; // CREATE OBJECTS // THE ROOM // room variables $RoomX = 30; $RoomY = RoomX; $RoomZ = RoomX*2.4; $RoomTex = texture { pigment {DarkSeaGreen1} finish {ambient Amber} } // the room $TheRoom = difference { box { <-RoomX-0.1,-RoomY-0.1,-RoomZ+0.1>, <(RoomX*3)+1.1,RoomY+0.1,(RoomZ*0.2)+0.1> } box { <-RoomX,-RoomY,-RoomZ>, } cylinder { <(RoomX*3)-0.2,0,0>, <(RoomX*3)+1.2,0,0> HoleRad } texture {RoomTex} } // MEDIA BOX #if (MediaOn) box { <-RoomX+0.001,-RoomY+0.001,-HoleRad>, <999990,RoomY-0.001,HoleRad> 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.0/256 //lower=better 1/128 scattering { 1, //1-5 LiteColor*LaserFactor extinction 0 } } } } #end // LIGHTS light_source { MainLiteTrans, LiteColor media_attenuation on photons { refraction off reflection on } } // camera variables $ CamPosX = 21; $ CamPosY = 0; $ CamPosZ = -RoomZ-14; $CamLookX = CamPosX; $CamLookY = 0; $CamLookZ = 0; //$CamAngle = 70; // camera #$ CamPos = ; #$CamLook = ; camera { location CamPos look_at CamLook // angle CamAngle } light_source { CamPos, White*0.5 media_interaction off photons { refraction off reflection off } } // A MIRROR $AMirror = union { cylinder { <-MirrorTh,0,0>, <0,0,0> MirrorRad material {MirrorMat} #if (PhotonsOn) photons { target TargetNum refraction off reflection on } #end } difference { // rim cylinder { <-MirrorTh-0.01,0,0>, <0,0,0> MirrorRad+0.2 } cylinder { <-MirrorTh,0,0>, <0.01,0,0> MirrorRad+0.0001 } material {FrameMat} } scale <1,MirrorStretch,1> } $Stand = difference { cylinder { <0,-100,0>, <0,2,0> MirrorRad*0.3 } box { <-4,-0.1,-4>, <4,8,4> rotate z*-45 } material {FrameMat} } $MountTh = 0.5; $MountRad = HoleRad*1.1; $Mount = cylinder { <0,-RoomY,0>, <0,-RoomY+MountTh,0> MountRad material {FrameMat} } // MIRROR ONE $MirrorOneX = MirrorGap*1.5; $MirrorOneRotZ = 45; $MirrorOne = union { object { AMirror rotate <0,0,MirrorOneRotZ> } object {Stand} object {Mount} translate } // MIRROR TWO $MirrorTwoX = MirrorOneX; $MirrorTwoY = 12; $MirrorTwoRotZ = 225; $MirrorTwo = union { object { AMirror rotate <0,0,MirrorTwoRotZ> } object { Stand rotate x*180 rotate y*180 } object { Mount translate <0,(RoomY*2)-MountTh-MirrorTwoY,0> } translate } // MIRROR THREE $MirrorThreeX = MirrorGap*0.5; $MirrorThreeY = MirrorTwoY; $MirrorThreeRotZ = -45; $MirrorThree = union { object { AMirror rotate <0,0,MirrorThreeRotZ> } object { Stand rotate x*180 } object { Mount translate <0,(RoomY*2)-MountTh-MirrorThreeY,0> } translate } // MIRROR FOUR $MirrorFourX = MirrorThreeX; $MirrorFourY = -15; $MirrorFourRotZ = 135; $MirrorFour = union { object { AMirror rotate <0,0,MirrorFourRotZ> } object { Stand rotate y*180 } object { Mount translate <0,-MirrorFourY,0> } translate } // MIRROR FIVE $MirrorFiveX = -MirrorGap*0.5; $MirrorFiveY = MirrorFourY; $MirrorFiveRotZ = 45; $MirrorFive = union { object { AMirror rotate <0,0,MirrorFiveRotZ> } object {Stand} object { Mount translate <0,-MirrorFiveY,0> } translate } // MIRROR SIX $MirrorSixX = MirrorFiveX; $MirrorSixY = 21; $MirrorSixRotZ = 45+180; $MirrorSix = union { object { AMirror rotate <0,0,MirrorSixRotZ> } object { Stand rotate x*180 rotate y*180 } object { Mount translate <0,(RoomY*2)-MountTh-MirrorSixY,0> } translate } // MIRROR SEVEN $MirrorSevenX = -MirrorGap*1.5; $MirrorSevenY = MirrorSixY; $MirrorSevenRotZ = -45; $MirrorSeven = union { object { AMirror rotate <0,0,MirrorSevenRotZ> } object { Stand rotate x*180 } object { Mount translate <0,(RoomY*2)-MountTh-MirrorSevenY,0> } translate } // MIRROR EIGHT $MirrorEightX = MirrorSevenX; $MirrorEightY = 10; $MirrorEightRotZ = 135; $MirrorEight = union { object { AMirror rotate <0,0,MirrorEightRotZ> } object { Stand rotate y*180 } object { Mount translate <0,-MirrorEightY,0> } translate } // LASER GUN $LaserX1 = 40; $LaserX2 = LaserX1+40; $BarrelRing = union { cylinder { , HoleRad*2 } torus { HoleRad*2, 0.5 sturm rotate x*90 rotate y*90 translate } } $LaserGun = difference { union { cylinder { , HoleRad*1.3 } object {BarrelRing} object {BarrelRing translate <4,0,0>} object {BarrelRing translate <8,0,0>} sphere {, HoleRad*3} cylinder { , HoleRad*3 } difference { // stand box { , } cylinder { , 20 } } box { // base , } } cylinder { , HoleRad } material {LaserMat} } // PLACE OBJECTS //background {DeepSkyBlue1} object {TheRoom} object {MirrorOne} object {MirrorTwo} object {MirrorThree} object {MirrorFour} object {MirrorFive} object {MirrorSix} object {MirrorSeven} object {MirrorEight} object {LaserGun}