home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polymore / fig2-9.pi < prev   
Text File  |  1994-09-25  |  1KB  |  72 lines

  1. // FIG2-9.PI
  2.  
  3. include "d:\polyray\include\colors.inc"
  4. include "d:\polyray\include\texture.inc"
  5.  
  6. //////////////////////////////////
  7. // The scene starts here
  8.  
  9. define Water
  10. texture {
  11.    noise surface {
  12.       color <0.4, 0.4, 1.0>
  13.       normal ripple_normal
  14.       frequency 100
  15.       bump_scale 1
  16.       ambient 0.3
  17.       diffuse 0.3
  18.       specular white, 0.7
  19.       reflection 0.9
  20.       microfacet Reitz 10
  21.       }
  22.      scale<10, 1, 10>
  23.    }
  24.  
  25. // Make a rippled sea
  26. // PLANE (Polygon)
  27. object {
  28.    polygon 4, <-100,0,100>, <-100,0,-100>, <100,0,-100>, <100,0,100>
  29.    translate <0, -1, 0>
  30.    water
  31. }
  32.  
  33. define dents
  34. texture {
  35.    noise surface {
  36.       color <1, 0, 0>
  37.       normal dented_normal
  38.       frequency 2
  39.       bump_scale 1
  40.       ambient white, 0.2
  41.       diffuse white, 0.5
  42.       specular 0.7
  43.       microfacet Reitz 10
  44.       }
  45.    scale <0.2, 0.2, 0.2>
  46.    }
  47.  
  48. // Sphere
  49. object
  50.       { 
  51.      sphere<0, 0, 5>, 4
  52.      shiny_red
  53.      dents
  54.       }
  55.  
  56. // The scene ends here
  57. //////////////////////////////////
  58.             
  59. // Lights!
  60. light<-5, 5, -5>
  61. haze 0.95, 10, black
  62.  
  63. // Camera!
  64. viewpoint
  65.   from <0, 0, -1>
  66.   at <0, 0, 5>
  67.   up <0, 1, 0>
  68.   aspect 1.6
  69. }
  70.  
  71.