#version unofficial Megapov 0.7


#include "mur.inc"
#include "mur2.inc"
#include "mur_zinn.inc"
#include "stones.inc" 

#declare nseed = 1;
#declare ra = seed(nseed);
#declare alphx = 30; 
#declare bety = 30;
#declare gammz = 30;
#declare xetax = 0.125;
#declare yetay = 0.125;
#declare zetaz = 0.125;
#declare zetbz = 0;
#declare superx = 0.4;
#declare supery = 0.4;
#declare shrinkz = 0;
#declare shrink = 0.28;
#declare MIN_STONE_LENGTH = 1.99;
#declare MAX_STONE_LENGTH = 2.5*MIN_STONE_LENGTH;
#declare MIN_STONE_HEIGHT = 0.5*MIN_STONE_LENGTH;
#declare MAX_STONE_HEIGHT = MIN_STONE_LENGTH; 

#declare tfac = 4;



#declare StoneWallStoneTexture2 =
 texture { 
         T_Stone8 
         normal { agate turbulence 0.5 bump_size 1.3 scale 0.25 }  
         finish { ambient 0.2 diffuse 1 specular 0.1 roughness 0.2 crand 0.2 }}
         
#declare StoneWallRGBlow = <0.75,0.60,0.55>;
#declare StoneWallRGBhigh = <1,0.925,.8>;

#declare MortarTexture2 =
 texture {
        pigment{ bozo color_map {[0 rgbft <0.8,0.85,0.8,0,0> ]
                                 [1 rgbft <0.75,0.75,0.65,0,0> ]} 
                 turbulence 0.6 omega 0.8 lambda 3.0 ramp_wave }      
        normal { granite bump_size 1.5} 
        finish { ambient 0.35 diffuse 1 specular 0.03 roughness 0.5 crand 0.08 }}



object { stone_wall2 ( 0,               //1
              240,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,  
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <120,24,1>
  rotate <0,28,0> translate <-322.5,9-tfac/2,480.5>  
 }


object { stone_wall2 ( 0,               //2
              240,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <120,24,1>
  rotate <0,14,0> translate <-221.2,9-tfac/2,425.7>  
 }


object { stone_wall2 ( 0,               //3
              160,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <80,24,1>
  rotate <0,50,0> translate <-118.5,9-tfac/2,403.6>  
 }
 
object { stone_wall2 ( 0,               //4
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,23,0> translate <-66.7,9-tfac/2,342>  
 }
       
object { stone_wall2 ( 0,               //5
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,65,0> translate <-35,9-tfac/2,330>  
 }
        
object { stone_wall2 ( 0,               //6
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,51,0> translate <-21.5,9-tfac/2,297>  
 }  

object { stone_wall2 ( 0,               //7
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,86,0> translate <0.5,9-tfac/2,273.5>  
 }
 
object { stone_wall2 ( 0,               //8
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,60,0> translate <3,9-tfac/2,234>  
 }                                                                              

object { stone_wall2 ( 0,               //9
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,93,0> translate <23,9-tfac/2,206>  
 }

object { stone_wall2 ( 0,               //10
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,76,0> translate <20.7,9-tfac/2,167.5>  
 }

object { stone_wall ( 0,               //11
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,94,0> translate <30,9-tfac/2,134>  
 } 
 
object { stone_wall ( 0,               //12
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,75,0> translate <27,9-tfac/2,95>  
 }                      


object { stone_wall ( 0,               //13
              80,48, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  scale <40,24,1>
  rotate <0,93,0> translate <37,9-tfac/2,60>  
 }







                              //  zinnen 
 #declare alphx = 12; 
 #declare bety = 12;
 #declare zetaz = 0.06;
 #declare shrink = 0.08667;
 #declare MIN_STONE_LENGTH = 1;
 #declare MAX_STONE_LENGTH = 2.5*MIN_STONE_LENGTH;
 #declare MIN_STONE_HEIGHT = 0.5*MIN_STONE_LENGTH;
 #declare MAX_STONE_HEIGHT = MIN_STONE_LENGTH; 
 #declare lfac = 240;
 #declare breite = 4;
 #declare spalte = 13;
 //#declare tfac = 4;



#declare xfac = 0;                   //1
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,28,0> translate <-322.5,33-tfac/2,480.5>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //2
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,14,0> translate <-221.2,33-tfac/2,425.7>
  }  
  #declare xfac = xfac+1;
#end 

 #declare lfac = lfac/3*2;   


#declare xfac = 0;                   //3
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,50,0> translate <-118.5,33-tfac/2,403.6>
  }  
  #declare xfac = xfac+1;
#end

 #declare lfac = lfac/2;

#declare xfac = 0;                   //4
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,23,0> translate <-66.7,33-tfac/2,342>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //5
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,65,0> translate <-35,33-tfac/2,330>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //6
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,51,0> translate <-21.5,33-tfac/2,297>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //7
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,86,0> translate <0.5,33-tfac/2,273.5>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //8
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,60,0> translate <3,33-tfac/2,234>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //9
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,93,0> translate <23,33-tfac/2,206>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //10
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,76,0> translate <20.7,33-tfac/2,167.5>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //11
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,94,0> translate <30,33-tfac/2,134>
  }  
  #declare xfac = xfac+1;
#end    

#declare xfac = 0;                   //12
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,75,0> translate <27,33-tfac/2,95>
  }  
  #declare xfac = xfac+1;
#end     
 
#declare xfac = 0;                   //13
#while ((lfac-(xfac*(breite+spalte)))>breite)
  object { stone_wallz ( nseed,               
              breite,tfac, 
              MIN_STONE_LENGTH, MAX_STONE_LENGTH,
              MIN_STONE_HEIGHT, MAX_STONE_HEIGHT, 
              <0.25,0.25>, shrink,
              StoneWallStoneTexture2, StoneWallRGBlow, StoneWallRGBhigh, MortarTexture2 )
  translate <xfac*(breite+spalte)/12,0,0> scale <6,tfac/2,3>
  rotate <0,93,0> translate <37,33-tfac/2,60>
  }  
  #declare xfac = xfac+1;
#end    

