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

  1. //FIG2-10.PI
  2.  
  3. include "d:\polyray\include\colors.inc"
  4. include "d:\polyray\include\texture.inc"
  5. include "d:\polyray\include\stones.inc"
  6.  
  7. viewpoint {
  8.  from      <0, 5, -20.0>
  9.  at        <0.0, 2.5, 5>
  10.  up        <0.0, 1.0, 0.0>
  11.  angle 30
  12.  aspect 1.6
  13.  }
  14.  
  15. // LIGHT_SOURCE
  16.     light <-10, 10, -10>
  17.  
  18. haze 0.95, 20, black
  19.  
  20. // Agate texture to use for the colour map changes
  21. define my_agate
  22. texture {
  23.    noise surface {
  24.       ambient 0.4
  25.       diffuse 0.6
  26.       specular white, 0.2
  27.       microfacet Cook 4
  28.       position_fn position_objectx
  29.       position_scale 1.1
  30.       lookup_fn lookup_sawtooth
  31.       octaves 3
  32.       turbulence 2
  33.       color_map(
  34.          [0.0, 0.5, Red, Green]
  35.          [0.5, 1.0, Green, Red])
  36.       }
  37.    scale <0.5, 0.5, 0.5>
  38.    }
  39.  
  40. // PLANE (Polygon)
  41. object {
  42.    polygon 4, <-100,0,100>, <-100,0,-100>, <100,0,-100>, <100,0,100>
  43.    translate <0, -2.5, 0>
  44.    texture{ checker sapphire_agate, my_agate
  45.              scale <5, 5, 5>}  
  46. }
  47.  
  48. // SPHERE - normal blue agate
  49. object {
  50.     sphere <-4.0, 2.5, 6.0>, 3.0
  51.     sapphire_agate
  52. }
  53.  
  54. // SPHERE - blue agate using my colour map
  55. object {
  56.     sphere <4.0, 2.5, 6.0>, 3.0
  57.     my_agate
  58. }
  59.  
  60.