home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 494.CLIP1.V < prev    next >
Text File  |  1992-03-14  |  2KB  |  132 lines

  1.  
  2. //      clip.v -- test out new clipping planes
  3.  
  4. #include color.vc
  5.  
  6. studio {
  7.     from 1 -6 4
  8.     at 0 0 0
  9.     up 0 0 1
  10.     angle 35
  11.     res 640 480
  12.     antialias adaptive
  13.     aspect 4/3
  14.     background {
  15.         greys.map
  16.     }
  17.     ambient white * .2
  18. }
  19.  
  20. light {
  21.     type point
  22.     falloff 0
  23.     position 1 -.5 5
  24.     color white * .5
  25. }
  26. light {
  27.     type point
  28.     falloff 0
  29.     position -2 -4 5
  30.     color white * .5
  31. }
  32.  
  33. //      base surface
  34.  
  35. surface {
  36.     diff plum * .5          // dark plum
  37. }
  38. ring { center 0 0 0 normal 0 0 1 radius 1000 }
  39.  
  40. //      clip spheres
  41.  
  42. surf {
  43.     diff 0 .5 1
  44.     shine 20 white
  45. }
  46.  
  47. sphere {
  48.     center -1.5 0 .5
  49.     radius .5
  50.     clip {
  51.         center -1.5 0 .2
  52.         normal 0 0 -1   // only keep bottom part
  53.     }
  54. }
  55. sphere {
  56.     center -0.5 0 .5
  57.     radius .5
  58.     clip {
  59.         center -0.5 0 .4
  60.         normal 0 0 -1   // only keep bottom part
  61.     }
  62. }
  63. sphere {
  64.     center 0.5 0 .5
  65.     radius .5
  66.     clip {
  67.         center 0.5 0 .6
  68.         normal 0 0 -1   // only keep bottom part
  69.     }
  70. }
  71. sphere {
  72.     center 1.5 0 .5
  73.     radius .5
  74.     clip {
  75.         center 1.5 0 .8
  76.         normal 0 0 -1   // only keep bottom part
  77.     }
  78. }
  79.  
  80.  
  81. sphere {        //      keep bottom wedge
  82.     center -1.5 -1 .5
  83.     radius .5
  84.     clip {
  85.         center -1.5 -1 .2
  86.         normal 1 0 -1   // only keep bottom part
  87.     }
  88.     clip {
  89.         center -1.5 -1 .2
  90.         normal -1 0 -1   // only keep bottom part
  91.     }
  92. }
  93.  
  94. //      use two hemispheres to make a cup with thickness
  95.  
  96. sphere {
  97.     center 0 -1 .5
  98.     radius .5
  99.     clip {
  100.         center 0 -1 .5
  101.         normal 0 0 -1   // only keep bottom part
  102.     }
  103. }
  104. sphere {
  105.     center 0 -1 .5
  106.     radius .4
  107.     clip {
  108.         center 0 -1 .5
  109.         normal 0 0 -1   // only keep bottom part
  110.     }
  111. }
  112. ring {          // edge of clip cup
  113.     center 0 -1 .5
  114.     normal 0 0 1
  115.     min_radius .4   // radius of inner hemisphere
  116.     max_radius .5   // radius of outer hemisphere
  117. }
  118.  
  119. sphere {        // keep ring around center
  120.     center 1.5 -1 .5
  121.     radius .5
  122.     clip {
  123.         center 1.5 -1 .6
  124.         normal 0 0 -1   // toss top
  125.     }
  126.     clip {
  127.         center 1.5 -1 .4
  128.         normal 0 0 1    // toss bottom
  129.     }
  130. }
  131.  
  132.