home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / texsamps / woods / woodbox.pov < prev    next >
Text File  |  1997-12-12  |  6KB  |  224 lines

  1. // woodbox.pov
  2. // POV-Ray 3.0 scene file by Dan Farmer
  3. // Copyright POV-Team, 1995
  4. // Demonstrates some of the woods.inc textures.
  5. // Several wooden spheres (and one glass one), in and around
  6. // a wooden box.
  7.  
  8. include "colors.inc"
  9. #include "textures.inc"
  10. #include "shapes.inc"
  11. #include "metals.inc"
  12. #include "glass.inc"
  13. #include "woods.inc"
  14.  
  15. camera {
  16.    location <-5, 10, -15>
  17.    direction <0, 0,  2.25>
  18.    right x*1.33
  19.    look_at <0,0,0>
  20. }
  21.  
  22. // Uncomment the area lights only if you've got lots of time.
  23. #declare Dist=80.0
  24. light_source {< -50, 25, -50> color White
  25.      fade_distance Dist fade_power 2
  26. //   area_light <-40, 0, -40>, <40, 0, 40>, 3, 3
  27. //   adaptive 1
  28. //   jitter
  29. }
  30. light_source {< 50, 10,  -4> color Gray30
  31.      fade_distance Dist fade_power 2
  32. //   area_light <-20, 0, -20>, <20, 0, 20>, 3, 3
  33. //   adaptive 1
  34. //   jitter
  35. }
  36. light_source {< 0, 100,  0> color Gray30
  37.      fade_distance Dist fade_power 2
  38. //   area_light <-30, 0, -30>, <30, 0, 30>, 3, 3
  39. //   adaptive 1
  40. //   jitter
  41. }
  42.  
  43. sky_sphere {
  44.     pigment {
  45.         gradient y
  46.         color_map {
  47.             [0, 1  color Gray50 color Gray80]
  48.         }
  49.     }
  50. }
  51.  
  52. #declare M_Wood18B =
  53. colour_map {
  54.     [0.00 0.25   color rgbf < 0.50, 0.26, 0.12, 0.10>
  55.                  color rgbf < 0.54, 0.29, 0.13, 0.20>]
  56.     [0.25 0.40   color rgbf < 0.54, 0.29, 0.13, 0.20>
  57.                  color rgbf < 0.55, 0.28, 0.10, 0.70>]
  58.     [0.40 0.50   color rgbf < 0.55, 0.28, 0.10, 0.70>
  59.                  color rgbf < 0.50, 0.23, 0.15, 0.95>]
  60.     [0.50 0.70   color rgbf < 0.50, 0.23, 0.15, 0.95>
  61.                  color rgbf < 0.56, 0.29, 0.17, 0.70>]
  62.     [0.70 0.98   color rgbf < 0.56, 0.29, 0.17, 0.70>
  63.                  color rgbf < 0.54, 0.29, 0.13, 0.20>]
  64.     [0.98 1.00   color rgbf < 0.54, 0.29, 0.13, 0.20>
  65.                  color rgbf < 0.50, 0.26, 0.12, 0.10>]
  66. }
  67.  
  68.  
  69. #declare Floor_Texture =
  70.     texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}}
  71.     texture { pigment { P_WoodGrain12A color_map { M_Wood18B }}}
  72.     texture {
  73.         pigment { P_WoodGrain12B color_map { M_Wood18B }}
  74.         finish { reflection 0.25 }
  75.     }
  76.  
  77. #declare Floor =
  78. plane { y,0
  79.     texture { Floor_Texture
  80.         scale 0.5
  81.         rotate y*90
  82.         rotate <10, 0, 15>
  83.         translate z*4
  84.     }
  85. }
  86.  
  87. #declare T0 = texture { T_Wood19 }
  88.  
  89. #declare T =
  90. texture { T0
  91.     finish { specular 0.50 roughness 0.1 ambient 0.25 }
  92. }
  93.  
  94. #declare T1 = texture { T translate  x*10 rotate <0, 87, 0> }
  95. #declare T2 = texture { T translate  y*10 rotate <0,  1, 0> }
  96. #declare T3 = texture { T translate -x*10 rotate  <0, 88, 0> translate z*100}
  97.  
  98. #declare Front_Panel =
  99. box      { <-3.75, 0.00, -0.5>,
  100.            < 3.75, 1.75,  0.0> }
  101.  
  102. #declare Front_Top_Edge   =
  103. cylinder { <-3.75, 1.75,  0.0>,
  104.            < 3.75, 1.75,  0.0>, 0.5 }
  105.  
  106. #declare Front_Right_Edge =
  107. cylinder { < 3.75, 0.00,  0.0>,
  108.            < 3.75, 1.75,  0.0>, 0.5 }
  109.  
  110. #declare Front_Left_Edge  =
  111. cylinder { <-3.75, 0.00,  0.0>,
  112.            <-3.75, 1.75,  0.0>, 0.5 }
  113.  
  114. #declare Front_UL_Corner  = sphere   { <-3.75, 1.75,  0.0>, 0.5 }
  115. #declare Front_UR_Corner  = sphere   { < 3.75, 1.75,  0.0>, 0.5 }
  116.  
  117.  
  118. #declare Left_Panel      = box { <-0.50, 0, -2.75>, <0.50, 1.75, 2.75> }
  119. #declare Left_Top_Edge   = cylinder { <0, 1.75, -2.75>, <0, 1.75, 2.75>, 0.5 }
  120.  
  121. #declare Left_End =
  122. intersection {
  123.     union {
  124.         object { Left_Panel       }
  125.         object { Left_Top_Edge    }
  126.     }
  127.     plane { x, 0 }
  128.     texture { T2 }
  129.     bounded_by { box { <-0.501, 0.01, -3.251>, <0.01, 2.251, 3.251> } }
  130. }
  131.  
  132. #declare Box_Front =
  133. intersection {
  134.     union {
  135.         object { Front_Panel      }
  136.         object { Front_Top_Edge   }
  137.         object { Front_Left_Edge  }
  138.         object { Front_Right_Edge }
  139.         object { Front_UL_Corner  }
  140.         object { Front_UR_Corner  }
  141.     }
  142.     plane { z, 0 }
  143.     texture { T1}
  144.     bounded_by { box { <-4.251, 0.01, -0.51>, <4.251, 2.251,  0.01> }}
  145. }
  146. #declare Box_Bottom = box {<-3.75, 0.0, -2.75> <3.75, 0.25, 2.75> texture {T3} }
  147. #declare Box_Lid =    box {<-3.75, 0.0, -2.75> <3.75, 0.25, 2.75>
  148.     translate -2.75*z    // put "hinge" at origin
  149.     rotate x*25          // open the lid
  150.     translate 2.75*z     // move "hinge" back
  151.     translate y*2        // lift to top
  152.     texture {T3}
  153. }
  154. #declare Box =
  155. union {
  156.     object { Box_Front translate -z*2.75}
  157.     object { Box_Front scale <1,1,-1> translate z*2.75}
  158.     object { Left_End translate -x*3.75 }
  159.     object { Left_End scale <-1,1,1> translate x*3.75 }
  160.     object { Box_Lid  }
  161.     object { Box_Bottom }
  162. }
  163. #declare Spheres =
  164. union {
  165.  
  166.     // Inside of box
  167.     sphere { <1.5, 1.5, -0.75>, 1.25
  168.         texture {
  169.             T_Wood14
  170.             finish { specular 0.35 roughness 0.05 ambient 0.3 }
  171.             translate x*1
  172.             rotate <15, 10, 0>
  173.             translate y*2
  174.         }
  175.     }
  176.     // Inside of box
  177.     sphere { <-1.5, 1.25,  0.5>, 1
  178.         texture { T_Wood18
  179.             finish { specular 0.25 roughness 0.025 ambient 0.35 }
  180.             scale 0.33
  181.             translate x*1
  182.             rotate <10, 20, 30>
  183.             translate y*10
  184.         }
  185.     }
  186.     // Inside of box
  187.     sphere { <-0.75, 1.0, -1.5>, 0.75
  188.         texture { T_Wood10
  189.             finish { specular 0.5 roughness 0.005 ambient 0.35 }
  190.             translate x*1
  191.             rotate <30, 10, 20>
  192.         }
  193.     }
  194.  
  195.     // Outside of box
  196.     sphere { <-0.75, 0.75, -4.25>, 0.75
  197.         texture { T_Wood4
  198.             finish { specular 0.25 roughness 0.015 ambient 0.2 }
  199.         }
  200.     }
  201.     // Outside of box
  202.     sphere { <-2.25, 0.45, -4.5>, 0.45
  203.         texture { T_Wood20
  204.             finish { specular 0.15 roughness 0.15 ambient 0.3 }
  205.             rotate <45, 10, 45>
  206.             translate x*10
  207.         }
  208.     }
  209.  
  210.     // Outside of box
  211.     sphere { <-5.5, 0.95, 0.8>, 0.95 texture { T_Glass4 finish { caustics 1 }} }
  212.     // Outside of box
  213.     sphere { <-5.00, 0.75, -2.0>, 0.75 texture { T_Copper_2B} }
  214.     // Outside of box
  215.     sphere { <-1.75, 0.40, -5.4>, 0.40 texture { T_Brass_3B} }
  216. }
  217. union {
  218.     object { Floor }
  219.     object { Box }
  220.     object { Spheres }
  221.     rotate -y*35
  222. }
  223.  
  224.