POV-Ray : Newsgroups : povray.text.scene-files : Source for the well's roof Server Time
31 Oct 2024 06:02:23 EDT (-0400)
  Source for the well's roof (Message 1 to 1 of 1)  
From: Marc-Hendrik Bremer
Subject: Source for the well's roof
Date: 4 Mar 2001 11:36:47
Message: <3aa26f1f@news.povray.org>
Here is the code for the roof of my well.

Hope it helps,

Marc-Hendrik


##################   Start code #################

#declare AgateFun=
   function{pigment{agate  color_map{[0 rgb 0][1 rgb 1]}}}

#declare Dachhaelfte=
intersection{                                 // remove the ugly edges

on{ 
      #declare Rs=seed(845);
      #declare Reihen=0;                       

      #while (Reihen<15)
         #declare Zaehler=-1;

         #while (Zaehler <1.1)
             #declare OffZ=rand(Rs);
             isosurface {                              //Schindel
                  function { (
                                        (abs(x)-0.047&abs(z)-0.05)                   
                                       |(x*x+(z+0.05)*(z+0.05)-0.047*0.047)
                                  
)&abs(y-0.015*AgateFun((x+Zaehler)*10,(y+OffZ*15)*10,z*10))-0.01 
                  }                         
                method 2
                max_gradient 4
                accuracy 0.01
                contained_by{box {<-0.1,-0.2,-0.2>,<0.1,0.2,0.20>}}   // could perhaps
be a little smaller
              
               rotate z*rand(Rs)                                       // tilt it a
little
               translate z*-(0.35 +rand(Rs)/50)              // uneven bottom edge
               rotate x*7                                                    // make
them overlap (perhaps use a little more)
               translate z*Reihen/10                                // Put it in it's
row
               rotate -x*47                                                // rotate
it according to the slope of the roof
               translate <Zaehler+0.1*mod(Reihen,2)-(0.001 *rand(Rs)/50),2.07,-0.73>  
   // put it in it's column
               texture{pigment{rgb 0.1+rand(Rs)/20}}   // texture it individually
(could be improved)
         } 
         #declare Zaehler=Zaehler+0.2;                     
      #end   //While columns
   
      #declare Reihen=Reihen+1;
   #end   //
 While rows
   }
   box{<-1.1,0,-10>,<1.1,5,10>}
   cutaway_textures
}

#################################################


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.