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

  1. //FIG2-1.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, 10, -20.0>
  9.  at        <0.0, 2.5, 10>
  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.3, <0, 0, 0.9>,0,  <0, 0, 0.8>, 0.5]
  35.          [0.3, 1,   <0, 0, 0.8>, 0.5, <0, 0, 0.4>, 1])
  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 bumpy_green, blue_ripple
  45.              scale <5, 5, 5>}  
  46. }
  47.  
  48. // SPHERE - normal blue agate
  49. object {
  50.     sphere <-7.0, 2.5, 6.0>, 3.0
  51.     sapphire_agate
  52. }
  53.  
  54. // SPHERE - normal blue agate
  55. object {
  56.     sphere <0.0, 2.5, 6.0>, 3.0
  57.     texture{checker matte_white, matte_black}
  58. }
  59.  
  60. // SPHERE - blue agate using my colour map
  61. object {
  62.     sphere <7.0, 2.5, 6.0>, 3.0
  63.     texture{
  64.        layered
  65.        my_agate,
  66.        texture{ checker matte_white, matte_black}
  67.        }
  68. }
  69.  
  70.