home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / texture / wood.pi < prev    next >
Text File  |  1994-12-31  |  859b  |  47 lines

  1. // Generic Polyray input File
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Set up the camera
  5. viewpoint {
  6.    from <2,4,-8>
  7.    at <0,0,0>
  8.    up <0,1,0>
  9.    angle 45
  10.    resolution 160, 160
  11.    }
  12.  
  13. background <0, 0, 0>
  14. light <-10, 20, -20>
  15. light < -40, 40, 80>
  16.  
  17. include "../colors.inc"
  18. include "wood1.inc"
  19.  
  20. static define noisy_wood_fn1
  21.    sawtooth(|<x+0.5*dnoise(P,3)[0], y+0.5*dnoise(P,3)[1], 0>|)
  22.  
  23. static define brightness
  24.    1-|wood1[noisy_wood_fn1]|/sqrt(3)
  25.  
  26. define shiny_wood
  27. texture {
  28.    special shiny {
  29.       color wood1[noisy_wood_fn1]
  30.       diffuse 0.2 + 0.4 * brightness
  31.       specular white, 0.3
  32.       microfacet Cook brightness * 10
  33.       }
  34.    scale <0.4, 0.4, 0.4>
  35.    }
  36.  
  37. object {
  38.    sphere <0, 0, 0>, 1
  39.    shiny_wood
  40.    translate <0, 1, 0>
  41.    }
  42.  
  43. object {
  44.    box <-3, -0.5, -3>, <3, 0, 3>
  45.    shiny_wood
  46.    }
  47.