global_settings { max_trace_level 8 }

#include "colors.inc"
#include "golds.inc"
#include "textures.inc"
#include "stones.inc"
#include "glass.inc"
#include "metals.inc"
#include "hmelt02.inc"
#include "panel02.inc"
#include "bmelt07.inc"
#include "bdiff08.inc"
#include "posvspov10.inc"
#include "toilbowl04.inc"
#include "weaptest04.inc"

camera {
// location  <17,55.5,-21>
//orthographic
//   right <32,0,0>
//    up <0,24,0>
//      location <140, 28,140>
//    look_at <15,-4.5,-19>
 //  location <5,12,-74>               // FINAL RENDER!  angle 45
   location <1,14,-58>               //nope, new render
//      location <5,0,-76>            //test for problems
//    look_at <11,-5,-5>                //final render
    look_at <6,-3,-5>                //final render
//    look_at <17,5.5,-21>                //tester
//   angle 69
    angle 47
  }



 //light_source {<10,522, 0> color rgb <1,1,1>*.5}
 //light_source {<5,522, -5> color rgb <1,1,1>*.5}

 light_source {<10,522, -20> color rgb <1,1,1>*.4}
 light_source {<5,522, -25> color rgb <1,1,1>*.4}
//         atmosphere off
  //         atmospheric_attenuation off
   //       }
light_source {<-38,24,-75> color White *.1 }
light_source {<-38,24,66> color White*.1}//        was on
light_source {<57,24,-75> color White*.1}  //      was on
light_source {<57,24,66> color White*.1}

//atmosphere { type 1 color rgbf <1,0,.25,0.25>  samples 10
  //  distance .1
    //scattering  0.999                    }


#declare radi=73

light_source {
    <-6,20,28>
    color rgb <2222,-.95,-.95>
    cylinder
    //jitter
    point_at <-6,-12,28>
    radius 20
    atmospheric_attenuation on
    falloff radi
    tightness 10
}
#declare asteroid=
      texture{
              pigment{
                      bozo
                      turbulence 0.6  omega 0.8  lambda 3.0
                      color_map{
                              //  [0.00 color rgb<0.810, 0.310, 0.310>]
                              //  [1.00 color rgb<1.000, .8000, .800>]
                                [0.00 color rgb<0.810/1.5, 0.310/1.5, 0.310/1.5>]
                                [1.00 color rgb<1.000/1.5, .8000/1.5, .800/1.5>]
                                }
                     }
              normal{
                     bumps 1.0
                     turbulence 0.6  octaves 5  omega 0.65  lambda 3.0
                     scale <0.75, 0.75, 1.0>
                     }
              finish {
                     ambient 0.15
                     specular 0.2
                     }
          }

/*
cylinder {<0,0,78.1>,<0,0,200>,12
         texture {T_Stone9}
         translate <-20,-5,0>}

#declare bricky=
box {<-.5,-.5,-.5>,<.5,.5,15>
    texture {T_Stone8}}


#declare Cy=-14
#while (Cy<14)
object {bricky
       translate <-28,Cy*1.05,78>
       }
object {bricky
       translate <-12,Cy*1.05,78>
       }
#declare Cy=Cy+1
#end
*/
//difference {
plane {z,78
      texture {T_Stone8
      scale 3}
      }
//box {<-8,-16,-25>,<8,17,25>
  //  translate <-20,0,78>
    //}
    //}
plane {z,-87
      //pigment {White}
      texture {T_Stone8   rotate <0,99,0>
      scale 3}
      //texture {asteroid}

           }
plane {x,-43
      //pigment {White}
      texture {T_Stone8   rotate <0,66,0>
      scale 3}
      //texture {asteroid}
      }
plane {x,59
      //pigment {White}
      texture {T_Stone8  rotate <0,33,0>
      scale 3}
      //texture {asteroid}
      }

object {headmelt
       rotate <0,-20,0>
       scale <.4,.4,.4>
//       translate <-10,-14,39>
       translate <-10,-13,49>}
object {melt
       rotate <0,-123,0>
       //scale <1.2,1.2,1.2>
       translate <0,-13.5,28>}

object {diff
       rotate <0,-28,0>
       //scale 1
       translate <-15,-5,14>}
object {fight
       rotate <0,-5,0>
       translate <11,-4.5,-16>
       }
object {panel
       scale 1
       translate <13,5,11>
       }



lathe {
    quadratic_spline
    7,
    <0,0>, <0,0>, <0,5>,<0,5>,<1,4>,<2,2>,<4,1>
    pigment {White}
    no_shadow
    rotate <5,0,0>
    scale <4,4,4>
    translate <-6,10,28>
      }

//plane {y,-22  pigment {White}}
background {Gray20}



//object {bowl         scale <4,4,4>        translate <52,-13.5,57>       }

#declare R2= seed(123)
#declare TW = 30
#declare TS = -30
#declare TN = 30


#declare Cz=-43
#while (Cz < 49)
#declare Cx=-22
#while (Cx < 30)
       #declare RRR=rand(R2)+.1
       #declare GGG=sqrt(sqrt(sqrt(rand(R2))))+.1
       #declare BBB=sqrt(sqrt(sqrt(rand(R2))))+.1
       superellipsoid { <.25, .25>
                      translate <Cx*2,-16,Cz*2>
                      texture{
                      pigment { rgb <RRR,GGG,BBB> }
                      finish { phong 1 phong_size 50 reflection .35 }}

                      //scale 1
                      }
#declare Cx=Cx+1
#end
#declare Cz=Cz+1
#end

plane {y,-15.5
      pigment {White}}


object{weap
      translate <22,-16,-15>
      }

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              gif "cu.gif"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <5.5,5.5,1>
      translate <-15,7,-6>
      no_shadow
 // }
}

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              gif "ni.gif"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <5.5,5.5,1>
      translate <-9,7,-6>
      no_shadow
 // }
}

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              gif "sn.gif"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <5.5,5.5,1>
      translate <-10,-7,45>
      no_shadow
 // }
}

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              gif "zn.gif"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <5.5,5.5,1>
      translate <0,-5,26>
      no_shadow
 // }
}

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              gif "w.gif"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <5.5,5.5,1>
      translate <7.5,6,-19>
      no_shadow

 // }
}

#declare optional=
union{
cylinder {<-7.5,0,0>,<7.5,0,0>,.6
         texture {T_Stone22}
         translate <43-7.5,18,67>
         }
cylinder {<-7.5,0,0>,<7.5,0,0>,.6
         texture {T_Stone22}
         translate <43-7.5,3,67>
         }
cylinder {<0,-7.5,0>,<0,7.5,0>,.6
         texture {T_Stone22}
         translate <43,10.5,67>
         }
cylinder {<0,-7.5,0>,<0,7.5,0>,.6
         texture {T_Stone22}
         translate <27,10.5,67>
         }

box {<-1,-1,-.1>,<1,1,.1>
    texture{
            pigment{
                    image_map {
                              tga "bodydiam.tga"
                              once
                              map_type 0
                              }
                   }
            finish {ambient rgb <1,1,1> }

            }
      scale <15,15,1>
      translate <28,3,67>
      no_shadow

 // }
}
}
