home *** CD-ROM | disk | FTP | other *** search
- // Traffic Light by Mike Williams
- // NOTE: The object is long and thin and designed
- // to be rendered at 256 x 320 pixels
- // or some multiple or submultiple thereof
- // i.e. Mode 13 screen SIDEWAYS UP
-
- // Mike Williams
- // 111 Evering Road
- // LONDON N16 7SL
-
-
- #include "shapes"
- #include "colors"
- #include "textures"
-
- #declare shade = intersection
- { quadric { Cylinder_X scale <3.1 3.1 3.1> }
- quadric { Cylinder_X scale <3 3 3> inverse }
- plane { <1 0 0> 4 rotate <0 0 -30> }
- plane { <-1 0 0> 4 rotate <0 0 30> }
- }
-
- // Sky
- object
- { sphere { <0 -39000 0> 40000 inverse }
- texture
- { bozo
- turbulence 0.4
- colour_map
- { [0 0.5 colour red 0.4 green 0.5 blue 1
- colour red 0.4 green 0.5 blue 1.0]
- [0.5 0.7 colour red 0.4 green 0.5 blue 1
- colour red 1 green 1 blue 1.0]
- [0.7 1 colour red 1 green 1 blue 1
- colour red 0.7 green 0.7 blue 0.7]
- }
- scale <400 400 400>
- ambient 1
- diffuse 0
- }
- colour red 0.4 green 0.5 blue 1
- }
-
- camera
- { location <30 25 5>
- up <0 1 0>
- right <0.8 0 0>
- look_at <0 30 0>
- }
-
- object { light_source { <40 60 10> colour White } }
-
- object
- { sphere { <0 37 0> 5 }
- texture
- { Shiny
- colour Red
- ambient 0.9
- diffuse 0.1
- }
- }
-
- object
- { sphere { <0 30 0> 5 }
- texture
- { Shiny
- colour red 1 green 0.65 blue 0
- ambient 0.2
- diffuse 0.6
- }
- }
-
- object
- { sphere { <0 23 0> 5 }
- texture
- { Shiny
- colour Green
- ambient 0.2
- diffuse 0.6
- }
- }
-
- object
- { intersection { Cube }
- scale <4 13 4>
- translate <0 30 0>
- texture
- { granite
- brilliance 4
- phong 0.7
- phong_size 10
- colour_map
- { [0.0 0.4 colour Black colour Black]
- [0.4 1.01 colour DimGray colour Black]
- }
- scale <4 4 4>
- }
- }
-
- // floor
- object
- { plane { <0 1 0> -100 }
- texture
- { checker
- color Green
- color Yellow
- scale <60 60 60>
- }
- }
-
- object
- { union
- { intersection { shade translate <0 37 0> }
- intersection { shade translate <0 37 0> rotate <0 90 0> }
- intersection { shade translate <0 30 0> }
- intersection { shade translate <0 30 0> rotate <0 90 0> }
- intersection { shade translate <0 23 0> }
- intersection { shade translate <0 23 0> rotate <0 90 0> }
- }
- texture
- { Shiny
- colour White
- }
- }
-