home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / ply15dat.zip / COSSPH.PI < prev    next >
Text File  |  1992-09-19  |  695b  |  35 lines

  1. // Simple demonstration file of a functional texture
  2. // Polyray input file - Alexander Enzmann
  3.  
  4. viewpoint {
  5.    from <0,0,-12>
  6.    at <0,0,0>
  7.    up <0,1,0>
  8.    angle 30
  9.    resolution 160, 160
  10.    }
  11.  
  12. background SkyBlue
  13. light <-10,10,-10>
  14. light < 10,10,-10>
  15.  
  16. define sin_color_offset (sin(3.14 * fmod(x*y*z, 1)) + 1) / 2
  17. define sin_color <sin_color_offset, 0, 1 - sin_color_offset>
  18.  
  19. define xyz_sin_texture
  20. texture {
  21.    special surface {
  22.       color sin_color
  23.       ambient 0.2
  24.       diffuse 0.7
  25.       specular white, 0.2
  26.       microfacet Reitz radians(10)
  27.       }
  28.    }
  29.  
  30. // Create a sphere with a special texture
  31. object {
  32.    sphere <0, 0, 0>, 2
  33.    xyz_sin_texture
  34.    }
  35.