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

  1. // Traffic Light by Mike Williams
  2. // NOTE: The object is long and thin and designed
  3. //       to be rendered at 256 x 320 pixels
  4. //       or some multiple or submultiple thereof
  5. //       i.e. Mode 13 screen SIDEWAYS UP
  6.  
  7. // Mike Williams
  8. //  111 Evering Road
  9. //   LONDON N16 7SL
  10.  
  11.  
  12. #include "shapes"
  13. #include "colors"
  14. #include "textures"
  15.  
  16. #declare shade = intersection
  17. { quadric { Cylinder_X scale <3.1 3.1 3.1> }
  18.   quadric { Cylinder_X scale <3 3 3> inverse }
  19.   plane { <1 0 0> 4 rotate <0 0 -30> }
  20.   plane { <-1 0 0> 4 rotate <0 0 30> }
  21. }
  22.  
  23. // Sky 
  24. object
  25. { sphere { <0 -39000 0> 40000 inverse }
  26.   texture
  27.   { bozo
  28.     turbulence 0.4
  29.     colour_map
  30.     { [0 0.5 colour red 0.4 green 0.5 blue 1
  31.              colour red 0.4 green 0.5 blue 1.0]
  32.       [0.5 0.7 colour red 0.4 green 0.5 blue 1
  33.                colour red 1 green 1 blue 1.0]
  34.       [0.7 1 colour red 1 green 1 blue 1
  35.              colour red 0.7 green 0.7 blue 0.7]
  36.     }
  37.     scale <400 400 400>
  38.     ambient 1
  39.     diffuse 0
  40.   }
  41.   colour red 0.4 green 0.5 blue 1
  42. }
  43.  
  44. camera
  45. { location <30 25 5>
  46.   up <0 1 0>
  47.   right <0.8 0 0>
  48.   look_at <0 30 0>
  49. }
  50.  
  51. object { light_source { <40 60 10> colour White } }
  52.  
  53. object
  54. { sphere { <0 37 0> 5 }
  55.   texture
  56.   { Shiny
  57.     colour Red
  58.     ambient 0.9
  59.     diffuse 0.1
  60.   }
  61. }
  62.  
  63. object
  64. { sphere { <0 30 0> 5 }
  65.   texture
  66.   { Shiny
  67.     colour red 1 green 0.65 blue 0
  68.     ambient 0.2
  69.     diffuse 0.6
  70.   }
  71. }
  72.  
  73. object
  74. { sphere { <0 23 0> 5 }
  75.   texture
  76.   { Shiny
  77.     colour Green
  78.     ambient 0.2
  79.     diffuse 0.6
  80.   }
  81. }
  82.  
  83. object
  84. { intersection { Cube }
  85.   scale <4 13 4>
  86.   translate <0 30 0>
  87.   texture
  88.   { granite
  89.     brilliance 4
  90.     phong 0.7
  91.     phong_size 10
  92.     colour_map
  93.     { [0.0 0.4  colour Black  colour Black]
  94.       [0.4 1.01 colour DimGray colour Black]
  95.     }
  96.     scale <4 4 4>
  97.   }
  98. }
  99.  
  100. // floor
  101. object
  102. { plane { <0 1 0> -100 }
  103.   texture
  104.   { checker
  105.     color Green
  106.     color Yellow
  107.     scale <60 60 60>
  108.   }
  109. }
  110.  
  111. object
  112. { union
  113.   { intersection { shade translate <0 37 0> }
  114.     intersection { shade translate <0 37 0> rotate <0 90 0> }
  115.     intersection { shade translate <0 30 0> }
  116.     intersection { shade translate <0 30 0> rotate <0 90 0> }
  117.     intersection { shade translate <0 23 0> }
  118.     intersection { shade translate <0 23 0> rotate <0 90 0> }
  119.   }
  120.   texture
  121.   { Shiny
  122.     colour White
  123.   }
  124. }
  125.