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

  1. // Generic Polyray input File
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Set up the camera
  5. viewpoint {
  6.    from <0, 0, -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, 3, -20>
  15.  
  16. define turb_value (fmod(frame, 8) +1) * 0.5
  17. define octv_value (frame / 8) + 1
  18.  
  19. include "..\colors.inc"
  20. include "..\texture.inc"
  21.  
  22. // Simple color map texture
  23. define noise_texture0
  24. texture {
  25.    noise surface {
  26.       color white
  27.       position_fn position_plain
  28.       lookup_fn lookup_plain
  29.       octaves 6
  30.       turbulence 1
  31.       ambient 0.2
  32.       diffuse 0.8
  33.       specular 0.5
  34.       microfacet Reitz 10
  35.       color_map(
  36.          [0,   0.2, red,     orange]
  37.          [0.1, 0.3, orange,  blue]
  38.          [0.3, 0.5, blue,    skyblue]
  39.          [0.5, 0.7, skyblue, orange]
  40.          [0.7, 0.9, orange,  magenta]
  41.          [0.9, 1.0, magenta, red],
  42.          <1, 1, 1>)
  43.       }
  44.    scale <0.3, 0.3, 0.3>
  45.    }
  46.  
  47. define white_marble_texture
  48. texture {
  49.    noise surface {
  50.       color white
  51.       position_fn position_objectx
  52.       lookup_fn lookup_sawtooth
  53.       octaves octv_value
  54.       turbulence turb_value
  55.       ambient 0.2
  56.       diffuse 0.8
  57.       specular 0.3
  58.       microfacet Reitz 5
  59.       color_map(
  60.          [0.0, 0.8, <1, 1, 1>, <0.6, 0.6, 0.6>]
  61.          [0.8, 1.0, <0.6, 0.6, 0.6>, <0.1, 0.1, 0.1>])
  62.       }
  63.    }
  64.  
  65. object { sphere <0, 0, 0>, 2 noise_texture0 }
  66.