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

  1. // Generic Polyray input File
  2. // Demonstrates a bumpy sphere by applying "dnoise" to the normal
  3. // Polyray input file: Alexander Enzmann
  4.  
  5. // Set up the camera
  6. viewpoint {
  7.    from <0,0,-8>
  8.    at <0,0,0>
  9.    up <0,1,0>
  10.    angle 45
  11.    resolution 256, 256
  12.    }
  13.  
  14. background pink
  15. light 0.8*white, <-10, 10, -20>
  16. light 0.8*white, < 10, 10, -20>
  17. include "../colors.inc"
  18.  
  19. define wrinkly_red
  20. texture {
  21.    special shiny {
  22.       color red
  23.       normal N + 3 * (dnoise(2*P, <2,0.8,3>) - <0.5, 0.5, 0.5>)
  24.       }
  25.    }
  26.  
  27. object { sphere <0, 0, 0>, 2 wrinkly_red }
  28.