#include "colors.inc" #include "textures.inc" #include "functions.inc" #include "shapes.inc" #include "woods.inc" background { Black } light_source { <900, 560, -500> color White*.5 } light_source { <-8000, 15060, 500> color White*.5 } light_source { <900, 560, 500> color White*.5 } light_source { <50, 560, 500> color White*.5 } #declare CamSpline = spline { cubic_spline -.1, <50,50,-180> 0, <50,50,0> .1, <50,40,180> 0.2, <60,30,360> 0.3, <50,45,540> 0.4, <40,60,720> .5, <50,50,900> .6, <60,70,1080> .7, <50,80,1260> .8, <40,55,1440> .9, <50,50,1620> 1, <55,10,1800> 1.1, <50,20,1980> } #declare Bolt1Spline = spline { linear_spline 0, <20,20,0> 1, <20,20,4000> } #declare Bolt2Spline = spline { linear_spline 0, <70,70,-400> 1, <70,70,3600> } #declare Bolt3Spline = spline { linear_spline 0, <40,50,-800> 1, <40,50,3200> } camera { location <0,0,0> Spline_Trans(CamSpline, clock, y, 0.1, .6) } #declare rStream = seed(0); #macro TrenchWall(Height,Length) #declare currentPoint = 0; union { // base wall box { <0,0,0>, <-1,Height,Length> } #while(currentPoint < Length) #declare heightOfBox = (rand(rStream)*(Height/2))+(Height/2); #declare lengthOfBox = rand(rStream)*200; #declare widthOfBox = rand(rStream)* 12; box { <0,0,currentPoint>, } #declare currentPoint = currentPoint + lengthOfBox; #end #declare currentPoint = 0; #while(currentPoint < Length) #declare heightOfBox = (rand(rStream)*(Height/2))+(Height/2); #declare lengthOfBox = rand(rStream)*200; #declare widthOfBox = rand(rStream)* 12; box { <0,Height,currentPoint>, } #declare currentPoint = currentPoint + lengthOfBox; #end } #end #macro BuildTrench(Width,Length) union { object { TrenchWall(Width,Length) texture { pigment { White*.5 } finish{ ambient 0 diffuse 1 reflection 0.001}} } object { TrenchWall(Width,Length) texture { pigment { White*.5 } finish{ ambient 0 diffuse 1}} rotate <0,0,180> translate <100,Width,0> } object { TrenchWall(Width,Length) texture { pigment { White*.5 } finish{ ambient 0 diffuse 1}} rotate <0,0,90> translate } } #end object { BuildTrench(100,8000) } // first pair of bolts cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt1Spline, clock+.02, y, 0, 0) } cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt1Spline, clock, y, 0, 0) } // second pair of bolts cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt2Spline, clock+.02, y, 0, 0) } cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt2Spline, clock, y, 0, 0) } // third pair of bolts cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt3Spline, clock+.02, y, 0, 0) } cylinder { <0,0,0>, <0,0,50>, .5 texture { pigment { Red } finish { ambient 5 } } Spline_Trans(Bolt3Spline, clock, y, 0, 0) }