home *** CD-ROM | disk | FTP | other *** search
/ Computerspiele Selbermachen / computerspieleselbermachen.iso / arch / archtect.pov < prev   
Text File  |  1994-09-21  |  18KB  |  419 lines

  1. // archtect.pov
  2. // PovRay 2.0 file
  3. // Simple illustration of some objects in archtect.inc
  4. // Michael G. Wilkins 9/94
  5. // < CIS [73042,1022]; Internet/Bitnet wilkins@bootes.unm.edu>
  6.  
  7. #include "shapes.inc"
  8. #include "colors.inc"
  9. #include "textures.inc"
  10. #include "stones.inc"
  11. #include "fov.inc"
  12. #include "archtect.inc"
  13.  
  14. // set up floating constants (dx and dz come from archtect.inc file)
  15. #declare xd = 2.*dx   //x translation for laying flags of side 2  
  16. #declare zd = 2.*dz  //z translation for laying flags of side 2     
  17. #declare gr = 0.05    //grout cutback between flags
  18. #declare xt = -10.3923 //shift to front of foundation   
  19.  
  20. // useful to have
  21. #declare Tex1 = texture { Stone13 
  22.                         finish {
  23.                                 ambient .35
  24.                                 diffuse .6
  25.                                 reflection .01
  26.                                 }
  27.                         }
  28.  
  29. //****************************CAMERAS******************************
  30. /* camera {   //slant front view
  31.    location < 2., 8.0, -50.0 >
  32.    direction <0.0, 0.1, 1.3 >
  33.    up < 0.0, 1.0, 0.0 >
  34.    right < 4/3, 0.0, 0.0 >
  35.    look_at < 0., 4.0, 3.0 >
  36. }  */
  37. camera {   // Doric plinth closeup  
  38.    location < -3., 3.0, -21.0 >
  39.    direction <0.0, 0.1, 1.7 >
  40.    up < 0.0, 1.0, 0.0 >
  41.    right < 4/3, 0.0, 0.0 > 
  42.  /*  right < 1.0, 0.0, 0.0 > for 1:1 aspect ratio */
  43.    look_at < -3.0, 2.0, xt >
  44. }  
  45. /* camera {   // Doric cap closeup  
  46.    location < -4., 12.0, -24.0 >
  47.    direction <0.0, 0.1, 1.8 >
  48.    up < 0.0, 1.0, 0.0 >
  49.    right < 4/3, 0.0, 0.0 >
  50.    look_at < -3.0, 11.0, xt >
  51. }  */
  52. //---------------------------FOUNDATION------------------------------
  53. //big flagstone
  54. #declare Flag = object {  Hex scale <2.0-2*gr, 0.1, 2.0-2*gr > }
  55.  
  56. #declare Found = object { Hex scale < 12.0, 0.90, 12.0 > 
  57.                         texture {
  58.                                 pigment { Gray30 } //gray grout and base
  59.                                 finish {
  60.                                         ambient .1
  61.                                         diffuse .9 
  62.                                         }
  63.                                 }
  64.                         }
  65. //----------------------------FLAGSTONES---------------------------------
  66. // Stick flags on top of foundation. If you use strong marble patterns, 
  67. // randomize the texture of each flag (by a translate) to see the flag 
  68. // pattern rather than the marble pattern.
  69. #declare Base1 = object {
  70.     union {
  71.         object { Found }
  72.         // central flag in big hex floor plan - bit of color
  73.         object { Flag pigment { Sapphire_Agate }} 
  74.         // up + z central col 
  75.         object { Flag pigment { Gray90 } 
  76.                 translate <0.,0.9,zd>} 
  77.         object { Flag pigment { Gray90 }
  78.                 translate <0.,0.9,2*zd> }
  79.         object { Flag pigment { Gray90 } 
  80.                 translate <0.,0.9,3*zd> }
  81.         //down -z
  82.         object { Flag pigment { Gray90 } 
  83.                 translate <0.,0.9,-zd> }
  84.         object { Flag pigment { Gray90 } 
  85.                 translate <0.,0.9,-2*zd> }
  86.         object { Flag pigment { Gray90 } 
  87.                 translate <0.,0.9,-3*zd> }
  88.         // up + z 1 col -x 
  89.         object { Flag pigment { Gray90 } 
  90.                 translate <-xd,0.9,dz> }
  91.         object { Flag pigment { Gray90 } 
  92.                 translate <-xd,0.9,zd+dz> }
  93.         object { Flag pigment { Gray90 } 
  94.                 translate <-xd,0.9,2*zd+dz> }
  95.         //down -z
  96.         object { Flag pigment { Gray90 } 
  97.                 translate <-xd,0.9,-dz> }
  98.         object { Flag pigment { Gray90 } 
  99.                 translate <-xd,0.9,-zd-dz> }
  100.         object { Flag pigment { Gray90 } 
  101.                 translate <-xd,0.9,-2*zd-dz> }
  102.         // up + z 2 col -x 
  103.         object { Flag pigment { Gray90 } 
  104.                 translate <-2*xd,0.9,0.> }
  105.         object { Flag pigment { Gray90 } 
  106.                 translate <-2*xd,0.9,zd> }
  107.         object { Flag pigment { Gray90 } 
  108.                 translate <-2*xd,0.9,2*zd> }
  109.         object { Flag pigment { Gray90 } 
  110.                 translate <-2*xd,0.9,3*zd> }
  111.         //down -z
  112.         object { Flag pigment { Gray90 } 
  113.                 translate <-2*xd,0.9,-zd> }
  114.         object { Flag pigment { Gray90 } 
  115.                 translate <-2*xd,0.9,-2*zd> }
  116.         object { Flag pigment { Gray90 } 
  117.                 translate <-2*xd,0.9,-3*zd> }
  118.         // up + z 3 col -x 
  119.         object { Flag pigment { Gray90 } 
  120.                 translate <-3*xd,0.9,dz> }
  121.         object { Flag pigment { Gray90 } 
  122.                 translate <-3*xd,0.9,zd+dz> }
  123.         //down -z
  124.         object { Flag pigment { Gray90 } 
  125.                 translate <-3*xd,0.9,-dz> }
  126.         object { Flag pigment { Gray90 } 
  127.                 translate <-3*xd,0.9,-zd-dz> }
  128.         //last -x central corner 
  129.         object { Flag pigment { Gray90 } 
  130.                 translate <-4*xd,0.9,0.> }
  131.         // up + z 1 col +x
  132.         object { Flag pigment { Gray90 } 
  133.                 translate <xd,0.9,dz> }
  134.         object { Flag pigment { Gray90 } 
  135.                 translate <xd,0.9,zd+dz> }
  136.         object { Flag pigment { Gray90 } 
  137.                 translate <xd,0.9,2*zd+dz> }
  138.         //down -z
  139.         object { Flag pigment { Gray90 } 
  140.                 translate <xd,0.9,-dz> }
  141.         object { Flag pigment { Gray90 } 
  142.                 translate <xd,0.9,-zd-dz> }
  143.         object { Flag pigment { Gray90 } 
  144.                 translate <xd,0.9,-2*zd-dz> }
  145.         // up + z 2 col +x 
  146.         object { Flag pigment { Gray90 } 
  147.                 translate <2*xd,0.9,0.> }
  148.         object { Flag pigment { Gray90 } 
  149.                 translate <2*xd,0.9,zd> }
  150.         object { Flag pigment { Gray90 } 
  151.                 translate <2*xd,0.9,2*zd> }
  152.         object { Flag pigment { Gray90 } 
  153.                 translate <2*xd,0.9,3*zd> }
  154.         //down -z
  155.         object { Flag pigment { Gray90 } 
  156.                 translate <2*xd,0.9,-zd> }
  157.         object { Flag pigment { Gray90 } 
  158.                 translate <2*xd,0.9,-2*zd> }
  159.         object { Flag pigment { Gray90 } 
  160.                 translate <2*xd,0.9,-3*zd> }
  161.         // up + z 3 col -x 
  162.         object { Flag pigment { Gray90 } 
  163.                 translate <3*xd,0.9,dz> }
  164.         object { Flag pigment { Gray90 } 
  165.                 translate <3*xd,0.9,zd+dz> }
  166.         //down -z
  167.         object { Flag pigment { Gray90 } 
  168.                 translate <3*xd,0.9,-dz> }
  169.         object { Flag pigment { Gray90 } 
  170.                 translate <3*xd,0.9,-zd-dz> }
  171.         //last +x central corner 
  172.         object { Flag pigment { Gray90 } 
  173.                 translate <4*xd,0.9,0.> }
  174.         }
  175.         finish { ambient 0.2
  176.                  diffuse 0.7
  177.                  reflection 0.1
  178.                 }
  179.     }
  180. //now clean up edges of Base where flags overhang. 
  181. // a box would be far better here, as kindly pointed out 
  182. // by Truman Brown [71477,221].
  183. #declare Base2 = object { 
  184.         intersection {
  185.                 object { Base1 }
  186.                 //angled
  187.                 plane { < 0 0 1>, 0 rotate y*60 translate x*12 }
  188.                 plane { < 0 0 1>, 0 rotate y*120 translate x*12 }
  189.                 plane { < 0 0 1>, 0 rotate y*240 translate <-12,0,0> }
  190.                 plane { < 0 0 1>, 0 rotate y*300 translate <-12, 0, 0> } 
  191.                 //parallel X
  192.                 plane { < 0 0 1>, -xt }
  193.                 plane { < 0 0 1>, 0 rotate y*180 translate z*xt }
  194.                     }
  195.         }  
  196. //------------------------------WALL---------------------------------------
  197. #declare Brick = object { Bric scale <1.,1.,0.5> }  
  198. // Build wall of 1 course of blocks at origin. For front, move xt in Z.
  199. // Make wall longer than necessary, clip cleanly for corners
  200. #declare Wall = object {
  201.                    union {
  202.                         object { Brick translate <-5*tau,0., 0. > }
  203.                         object { Brick translate <-4*tau, 0., 0. > }
  204.                         object { Brick translate < -3*tau, 0., 0. > }
  205.                         object { Brick translate < -2*tau, 0., 0. > }   
  206.