home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / resources / jpeg / scenes / TenPin < prev    next >
Encoding:
Text File  |  1995-04-03  |  2.4 KB  |  112 lines

  1. // Ten Pin Bowling - by Mike Williams.
  2. // 111 Evering Road, LONDON N16 7SL
  3.  
  4.  
  5.  
  6. #include "colors"
  7. #include "textures"
  8. #include "shapes"
  9.  
  10.  
  11. camera {
  12.    location  <0 2.01 -8>
  13.    up        <0 1 0>
  14.    right     <1.25 0 0>
  15.    look_at   <0 0 0>
  16. }
  17.  
  18. object { light_source { <-15 40 -15> color White }}
  19. object { light_source { < 10 10 -35> color White }}
  20.                                           
  21.  
  22.  
  23. // A texture for the pins - two thin red bands on a white background
  24. // (at the zero layer of the texture there will be four red bands together
  25. // then two red bands at all other layers)
  26.  
  27. #declare pintex = texture
  28. { gradient <0 1 0>
  29.   colour_map
  30.   { [ 0.0  0.05 colour White colour White]
  31.     [ 0.05 0.1  colour Red   colour Red  ]
  32.     [ 0.1  0.15 colour White colour White]
  33.     [ 0.15 0.2  colour Red   colour Red  ]
  34.     [ 0.2  1.0 colour White colour White]
  35.   }
  36.   phong 0.7
  37.   phong_size 10
  38.   scale <1 2.4 1>
  39. }
  40.  
  41.  
  42. //**** A very long thin box which divides the infinite floor plane
  43. //     into separate bowling lanes
  44.  
  45. #declare lane = object
  46. { box {<-0.2 -3 -1000><0.2 -2.6 1000>}
  47.   texture {colour Gold}
  48.  
  49.  
  50. //**** The pins are figure-of-eight blobs with a smaller upper component
  51. //     stretched vertically.
  52. //     I find that these blobs need the STURM modifier to stop them
  53. //     breaking up.
  54.  
  55. #declare Pin =
  56. object {
  57.    blob {
  58.       threshold 0.4
  59.       component 0.9 0.6 <0  0.4 0>
  60.       component 1.0 1.0 <0 -0.65  0>
  61.       sturm
  62.         }
  63.    scale <1.25 2.7 1.25>
  64.    texture { pintex }
  65.    colour Yellow
  66. }
  67.  
  68.  
  69. // The floor is slightly reflective.
  70. object
  71.  { plane { <0 1 0> -3}
  72.    texture {colour Gold reflection 0.2}
  73.  }
  74.  
  75.  
  76. // 10 pins in a triangle arrangement
  77.  
  78. object {Pin}
  79. object {Pin translate <2 0 2>}
  80. object {Pin translate <-2 0 2>}
  81. object {Pin translate <4 0 4>}
  82. object {Pin translate <0 0 4>}
  83. object {Pin translate <-4 0 4>}
  84. object {Pin translate <6 0 6>}
  85. object {Pin translate <2 0 6>}
  86. object {Pin translate <-2 0 6>}
  87. object {Pin translate <-6 0 6>}
  88.  
  89. // 6 lane separators
  90.  
  91. object {lane translate <-8 0 0>}
  92. object {lane translate < 8 0 0>}
  93. object {lane translate <-24 0 0>}
  94. object {lane translate < 24 0 0>}
  95. object {lane translate <-40 0 0>}
  96. object {lane translate < 40 0 0>}
  97.  
  98. // The bowling ball.
  99. //
  100. // If you position the ball "correctly" it doesn't look right. It looks
  101. // like it isn't quite touching the ground.
  102. //
  103. // To make it look better I've positioned the ball so that it juts into the
  104. // floor by 0.02 units.
  105.  
  106. object
  107. { sphere {<-1 -1.8 -2> 1.22}
  108.   texture { granite scale <0.2 0.2 0.2> phong 1 }
  109. }
  110.  
  111.