home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / tsipp / tsipp.lha / tsipp3.0a / demos / strausstest.tcl < prev    next >
Encoding:
Text File  |  1992-11-02  |  2.0 KB  |  78 lines

  1. #==============================================================================
  2. #                              strausstest.tcl
  3. #------------------------------------------------------------------------------
  4. # A port of SIPP demo program strausstest.c to Tcl-SIPP.
  5. #------------------------------------------------------------------------------
  6. # $Id: strausstest.tcl,v 2.0 1992/11/02 03:55:33 markd Rel $
  7. #------------------------------------------------------------------------------
  8.  
  9. source util.tcl
  10. ParseArgs
  11.  
  12. #
  13. # Demo of the strauss shader. Four spheres are rendered, 
  14. # all with the same base color, but different smoothness
  15. # and metalness.
  16. #/
  17.  
  18. set RESOLUTION 30
  19.  
  20. #
  21. # Surface description of the spheres.
  22. #/
  23. set non_metal_dull [SippShaderStrauss 0.4 0.2 0.1 {0.6 0.33 0.27}]
  24.  
  25. set non_metal_shiny [SippShaderStrauss 0.4 0.7 0.1 {0.6 0.33 0.27}]
  26.  
  27. set metal_dull [SippShaderStrauss 0.4 0.2 0.9 {0.6 0.33 0.27}]
  28.  
  29. set metal_shiny [SippShaderStrauss 0.4 0.7 0.9 {0.6 0.33 0.27}]
  30.  
  31. #
  32. # Antique white surface as background.
  33. #
  34. set bg_surf [SippShaderBasic 0.4 0.0 0.99 {0.9804 0.9216 0.8431}]
  35.  
  36. SippLightSourceCreate {-1.0 -1.0 1.0} {1.0 1.0 1.0} DIRECTION
  37. SippLightSourceCreate { 0.0 -1.0 2.0} {0.6 0.6 0.6} DIRECTION
  38.  
  39. #
  40. # Non metal, dull. Upper left.
  41. #
  42. set nmd [SippSphere 1.0 $RESOLUTION $non_metal_dull WORLD]
  43. SippObjectMove $nmd {-1.1 0.0 1.1}
  44. SippObjectAddSubobj WORLD $nmd
  45.  
  46. #
  47. # Non metal, shiny. Upper right.
  48. #
  49. set nms [SippSphere 1.0 $RESOLUTION $non_metal_shiny WORLD]
  50. SippObjectMove $nms {1.1 0.0 1.1}
  51. SippObjectAddSubobj WORLD $nms
  52.  
  53. #
  54. # Metal, dull. Lower left.
  55. #
  56. set md [SippSphere 1.0 $RESOLUTION $metal_dull WORLD]
  57. SippObjectMove $md {-1.1 0.0 -1.1}
  58. SippObjectAddSubobj WORLD $md
  59.  
  60. #
  61. # Metal, shiny. Lower right.
  62. #
  63. set ms [SippSphere 1.0 $RESOLUTION $metal_shiny WORLD]
  64. SippObjectMove $ms {1.1 0.0 -1.1}
  65. SippObjectAddSubobj WORLD $ms
  66.  
  67. #
  68. # Background.
  69. #
  70. set bg [SippBlock {10.0 0.5 10.0} $bg_surf WORLD]
  71. SippObjectMove $bg {0.0 1.5 0.0}
  72. SippObjectAddSubobj WORLD $bg
  73.  
  74. SippCameraParams STDCAMERA {0.0 -10.0 0.0} {0.0 0.0 0.0} {0.0 0.0 1.0} 0.25
  75.  
  76. DoRendering "strauss"
  77.  
  78.