home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 526.CHESS2.V < prev    next >
Text File  |  1992-03-15  |  4KB  |  200 lines

  1. /*
  2.     nice chess board with glass
  3. */
  4.  
  5. #include color.vc
  6.  
  7. studio  {
  8.     from  10 -20 10
  9.     at  0 -2 -1
  10.     up  0 0 1
  11.     angle  30
  12.  
  13.     res  640 480
  14.     antialias  adaptive
  15.     threshold 2
  16.     aspect  4/3
  17.  
  18.     bkg  black
  19.     ambient  black
  20. }
  21.  
  22. //      let there be light
  23.  
  24. light  {
  25.     type  point
  26.     falloff  0
  27.     position  20  -10 40
  28.     color  .5 .5 .5
  29. }
  30.  
  31. light  {
  32.     type  point
  33.     falloff  0
  34.     position  -20 -30 10
  35.     color  .6 .6 .6
  36. }
  37.  
  38. //      define chess board
  39.  
  40. //      infinite plane thingy
  41.  
  42. surface  { diff  plum }
  43. ring  { radius  50 center  0 0 -1 normal  0 0 1 }
  44.  
  45. //      playing surface
  46.  
  47. surface  {
  48.     texture  {
  49.         pattern checker
  50.         scale 1 1 0
  51.         surface  { diff  black shine  20 }
  52.         surface  {
  53.             texture  {
  54.                 pattern spherical
  55.                 radius 1
  56.                 radius .3
  57.                 blend  .5
  58.                 surface  { diff  white shine  20 }
  59.                 surface  { diff  firebrick shine  20 }
  60.                 turbulence  {
  61.                     terms  6
  62.                     amp  3
  63.                 }
  64.             }
  65.         }
  66.     }
  67. }
  68.  
  69. polygon  {
  70.     points  4
  71.     vertex   4  4 0
  72.     vertex   4 -4 0
  73.     vertex  -4 -4 0
  74.     vertex  -4  4 0
  75. }
  76.  
  77. //      edges
  78.  
  79. surface  {
  80.     texture  {
  81.         pattern spherical
  82.         radius 1
  83.         radius .3
  84.         blend  .5
  85.         surface  { diff  white shine  20 }
  86.         surface  { diff  firebrick shine  20 }
  87.         turbulence  {
  88.             terms  6
  89.             amp  3
  90.         }
  91.     }
  92. }
  93.  
  94. polygon  {
  95.     points  4
  96.     vertex   4 -4 0
  97.     vertex   4  4 0
  98.     vertex   5  5 0
  99.     vertex   5 -5 0
  100. }
  101. polygon  {
  102.     points  4
  103.     vertex   4  4 0
  104.     vertex  -4  4 0
  105.     vertex  -5  5 0
  106.     vertex   5  5 0
  107. }
  108. polygon  {
  109.     points  4
  110.     vertex  -4 -4 0
  111.     vertex   4 -4 0
  112.     vertex   5 -5 0
  113.     vertex  -5 -5 0
  114. }
  115. polygon  {
  116.     points  4
  117.     vertex  -4  4 0
  118.     vertex  -4 -4 0
  119.     vertex  -5 -5 0
  120.     vertex  -5  5 0
  121. }
  122.  
  123. //      rounded edges and corners
  124.  
  125. sphere  { center   5  5 -0.5 radius  .5 }
  126. sphere  { center  -5  5 -0.5 radius  .5 }
  127. sphere  { center   5 -5 -0.5 radius  .5 }
  128. sphere  { center  -5 -5 -0.5 radius  .5 }
  129.  
  130. cone  { apex   5  5 -0.5 apex_radius  .5 base   5 -5 -0.5 base_radius  .5 }
  131. cone  { apex   5 -5 -0.5 apex_radius  .5 base  -5 -5 -0.5 base_radius  .5 }
  132. cone  { apex  -5 -5 -0.5 apex_radius  .5 base  -5  5 -0.5 base_radius  .5 }
  133. cone  { apex  -5  5 -0.5 apex_radius  .5 base   5  5 -0.5 base_radius  .5 }
  134.  
  135. //      glass
  136.  
  137. surface {
  138.     trans white * .7
  139.     ior 1.2
  140.     shine 10 white
  141. }
  142.  
  143. ring { center 2 -7 1.2 normal 0 0 1 radius .4 }
  144. cone { apex 2 -7 1.2 apex_radius .4
  145.      base 2 -7 1.3 base_radius .6 }
  146. cone { apex 2 -7 1.3 apex_radius .6
  147.      base 2 -7 3 base_radius .9 }
  148. ring { center 2 -7 3 normal 0 0 1 min_radius .9 max_radius 1 }
  149. cone { base 2 -7 3 base_radius 1
  150.      apex 2 -7 1.25 apex_radius .75 }
  151. cone { base 2 -7 1.25 base_radius .75
  152.      apex 2 -7 1 apex_radius .5 }
  153. cone { base 2 -7 1 base_radius .5
  154.      apex 2 -7 .9 apex_radius .1 }
  155.  
  156. //      glass stem
  157. cone { base 2 -7 .9 base_radius .1
  158.      apex 2 -7 -.8 apex_radius .1 }
  159.  
  160. //      glass base
  161. cone { apex 2 -7 -.8 apex_radius .1
  162.      base 2 -7 -.9 base_radius .8 }
  163. cone { apex 2 -7 -.9 apex_radius .8
  164.      base 2 -7 -.99 base_radius .9 }
  165. ring { center 2 -7 -.99 normal 0 0 -1 radius .9 }
  166.  
  167. //      fluid in glass
  168.  
  169. surface {
  170.     trans 1 .2 .4
  171.     ior 1.3
  172.     shine 20
  173. }
  174.  
  175. ring { center 2 -7 1.21 normal 0 0 -1 radius .39 }
  176. cone { apex 2 -7 1.21 apex_radius .39
  177.      base 2 -7 1.3 base_radius .59 }
  178. cone { apex 2 -7 1.3 apex_radius .59
  179.      base 2 -7 2.5 base_radius .8 }
  180.  
  181. //      rippled surface of fluid
  182.  
  183. surface {
  184.     trans 1 .2 .4
  185.     ior 1.2
  186.     shine 20 white
  187.     bump {
  188.         wave {
  189.             center 2.1 -7 2.5
  190.             wavelength 0.15
  191.             amp .4
  192.             damping 1.0
  193.             phase 0
  194.         }
  195.     }
  196. }
  197.  
  198. ring { center 2 -7 2.5 normal 0 0 1 radius .8 }
  199.  
  200.