home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / rayshade / examples / projecto.ray < prev    next >
Text File  |  1992-06-11  |  901b  |  42 lines

  1. /* 
  2.  * Sample program which uses a "projector" light source
  3.  * Written by Greg Spencer.
  4.  *
  5.  * Obviously, this requires an image to project.  I used the ever-popular
  6.  * mandrill, but you can use what you want.
  7.  *
  8.  * This is a simple scene, which basically projects the image over a ball
  9.  * sitting on a plane.
  10.  */
  11.  
  12. #ifndef IMAGE
  13. #define IMAGE fish13.tga
  14. #endif
  15.  
  16. background .1 .1 .1
  17. eyep 0 0 -40
  18. lookp 0 0 0
  19. up 0 1 0
  20. fov 60
  21. report verbose
  22. screen 300 300
  23. outfile testproj.rle
  24.  
  25. surface white ambient 0.1 0.1 0.1
  26.     diffuse 1.0 1.0 1.0
  27.     specular 0.4 0.4 0.4 
  28.     specpow 10
  29.  
  30. light 1.0 projector IMAGE tile 1 1 /* options 'tile' and 'smooth'
  31.                     are allowed here */
  32.     0 10 -30  /* from */
  33.     0 0 0 /* to */
  34.     1 1 0 /* up (u): v=dirXu */
  35.     60 /* u angle */
  36.     60 /* v angle */
  37.     false /* Don't use R^2 falloff in intensity */
  38.  
  39. plane white 0 0 0  0 0 -1
  40.  
  41. sphere white 5 0 0 -10 
  42.