home *** CD-ROM | disk | FTP | other *** search
- // Ten Pin Bowling - by Mike Williams.
- // 111 Evering Road, LONDON N16 7SL
-
-
-
- #include "colors"
- #include "textures"
- #include "shapes"
-
-
- camera {
- location <0 2.01 -8>
- up <0 1 0>
- right <1.25 0 0>
- look_at <0 0 0>
- }
-
- object { light_source { <-15 40 -15> color White }}
- object { light_source { < 10 10 -35> color White }}
-
-
-
- // A texture for the pins - two thin red bands on a white background
- // (at the zero layer of the texture there will be four red bands together
- // then two red bands at all other layers)
-
- #declare pintex = texture
- { gradient <0 1 0>
- colour_map
- { [ 0.0 0.05 colour White colour White]
- [ 0.05 0.1 colour Red colour Red ]
- [ 0.1 0.15 colour White colour White]
- [ 0.15 0.2 colour Red colour Red ]
- [ 0.2 1.0 colour White colour White]
- }
- phong 0.7
- phong_size 10
- scale <1 2.4 1>
- }
-
-
- //**** A very long thin box which divides the infinite floor plane
- // into separate bowling lanes
-
- #declare lane = object
- { box {<-0.2 -3 -1000><0.2 -2.6 1000>}
- texture {colour Gold}
- }
-
-
- //**** The pins are figure-of-eight blobs with a smaller upper component
- // stretched vertically.
- // I find that these blobs need the STURM modifier to stop them
- // breaking up.
-
- #declare Pin =
- object {
- blob {
- threshold 0.4
- component 0.9 0.6 <0 0.4 0>
- component 1.0 1.0 <0 -0.65 0>
- sturm
- }
- scale <1.25 2.7 1.25>
- texture { pintex }
- colour Yellow
- }
-
-
- // The floor is slightly reflective.
- object
- { plane { <0 1 0> -3}
- texture {colour Gold reflection 0.2}
- }
-
-
- // 10 pins in a triangle arrangement
-
- object {Pin}
- object {Pin translate <2 0 2>}
- object {Pin translate <-2 0 2>}
- object {Pin translate <4 0 4>}
- object {Pin translate <0 0 4>}
- object {Pin translate <-4 0 4>}
- object {Pin translate <6 0 6>}
- object {Pin translate <2 0 6>}
- object {Pin translate <-2 0 6>}
- object {Pin translate <-6 0 6>}
-
- // 6 lane separators
-
- object {lane translate <-8 0 0>}
- object {lane translate < 8 0 0>}
- object {lane translate <-24 0 0>}
- object {lane translate < 24 0 0>}
- object {lane translate <-40 0 0>}
- object {lane translate < 40 0 0>}
-
- // The bowling ball.
- //
- // If you position the ball "correctly" it doesn't look right. It looks
- // like it isn't quite touching the ground.
- //
- // To make it look better I've positioned the ball so that it juts into the
- // floor by 0.02 units.
-
- object
- { sphere {<-1 -1.8 -2> 1.22}
- texture { granite scale <0.2 0.2 0.2> phong 1 }
- }
-
-