home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / animate / flying / noiseanm.pi < prev    next >
Encoding:
Text File  |  1994-12-31  |  970 b   |  43 lines

  1. // Flyover of a noise based height field - takes about a day at 240x180 on 
  2. // on a 486/33
  3. // Polyray input file: Alexander Enzmann
  4. start_frame 0
  5. end_frame 300
  6.  
  7. // Set up the camera
  8. viewpoint {
  9.    from <0, 1.1, -4.5>
  10.    at <0, 0.5, 0>
  11.    up <0,1,0>
  12.    angle 25
  13.    resolution 240, 180
  14.    aspect 4/3
  15.    }
  16.  
  17. // Set up background color & lights
  18. background 0.2*white
  19. haze 0.8, 4, 0.2*white
  20.  
  21. light <10, 10, -10>
  22.  
  23. include "../../colors.inc"
  24.  
  25. define mountain_colors
  26.       color_map([-1.0, 0.0, blue,  blue]
  27.         [ 0.0, 0.4, green, green]
  28.         [ 0.4, 0.5, green, tan]
  29.         [ 0.5, 0.6, tan,   tan]
  30.         [ 0.6, 0.8, tan,   white]
  31.         [ 0.8, 1.0, white, white])
  32.  
  33. define field_texture
  34. texture { special shiny { color mountain_colors[y] } }
  35.  
  36. // Define a noise based height field
  37. define offset <0, 0, frame/4>
  38. define hfn (noise(P+offset) < 0.7 ? noise(P+offset,2) : noise(P+offset,5))
  39. object {
  40.    height_fn 200, 800, -4, 4, -4, 28, hfn
  41.    field_texture
  42.    }
  43.