home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Sample file
- // By ???
-
- // First stage of the Tower of Pisa
- // Later stages to follow
- // warning: This picture can take a very long time to ray trace
- // due to the large number of objects. You have been warned :->
-
- #include "shapes.dat"
- #include "colors.dat"
- #include "textures.dat"
-
- view_point
- location <0.0 25.0 -150.0>
- direction <0.0 0.1 1.0>
- up <0.0 1.0 0.0>
- right <1.3333 0.0 0.0>
- end_view_point
-
- #declare Beam = quadric Cylinder_Y
- scale <0.5 20.0 0.5>
- translate <2.0 0.0 0.0>
- end_quadric
-
- { create a sample column for the base of the structure }
-
- #declare BaseColumn = object
- intersection
- union
- quadric Beam end_quadric
- quadric Beam rotate <0.0 -25.7 0.0> end_quadric
- quadric Beam rotate <0.0 -51.4 0.0> end_quadric
- quadric Beam rotate <0.0 -77.1 0.0> end_quadric
- quadric Beam rotate <0.0 -102.8 0.0> end_quadric
- quadric Beam rotate <0.0 -128.5 0.0> end_quadric
- quadric Beam rotate <0.0 -154.2 0.0> end_quadric
- quadric Beam rotate <0.0 -179.9 0.0> end_quadric
- quadric Beam rotate <0.0 -205.6 0.0> end_quadric
- quadric Beam rotate <0.0 -231.3 0.0> end_quadric
- quadric Beam rotate <0.0 -257.0 0.0> end_quadric
- quadric Beam rotate <0.0 -282.7 0.0> end_quadric
- quadric Beam rotate <0.0 -308.4 0.0> end_quadric
- quadric Beam rotate <0.0 -334.1 0.0> end_quadric
- end_union
-
- plane <0.0 1.0 0.0> 40.0 end_plane
- plane <0.0 -1.0 0.0> 0.0 end_plane
- end_intersection
-
- bounded_by
- intersection
- plane <0.0 1.0 0.0> 40.0 end_plane
- plane <0.0 -1.0 0.0> 0.0 end_plane
- quadric
- Cylinder_Y
- scale <2.51 1.0 2.51>
- end_quadric
- end_intersection
- end_bound
-
- texture
- Red_Marble
- scale <10.0 10.0 10.0>
- ambient 0.4
- diffuse 0.9
- reflection 0.1
- end_texture
-
- colour red 0.8 green 0.0 blue 0.0
-
- end_object
-
- { and a rectangular pad to serve as a footing for the column }
-
- #declare BasePad = object
- intersection
- plane <0.0 1.0 0.0> 1.0 end_plane
- plane <0.0 -1.0 0.0> 1.0 end_plane
- plane <0.0 0.0 1.0> 4.0 end_plane
- plane <0.0 0.0 -1.0> 4.0 end_plane
- plane <1.0 0.0 0.0> 4.0 end_plane
- plane <-1.0 0.0 0.0> 4.0 end_plane
- end_intersection
-
- bounded_by
- quadric
- QSphere
- scale <10.0 3.0 10.0>
- end_quadric
- end_bound
-
- texture
- Red_Marble
- scale <10.0 10.0 10.0>
- ambient 0.4
- diffuse 0.9
- reflection 0.1
- end_texture
-
- colour red 0.6 green 0.6 blue 0.4
-
- end_object
-
- { and define a basic arch to span the columns }
-
- #declare BaseArch = object
- intersection
- quadric Cylinder_X scale <1.0 12.5 12.5> end_quadric
- quadric Cylinder_X scale <1.0 8.5 8.5> inverse end_quadric
- plane <1.0 0.0 0.0> 2.0 end_plane
- plane <-1.0 0.0 0.0> 2.0 end_plane
- plane <0.0 -1.0 0.0> 0.0 end_plane
- end_intersection
-
- bounded_by
- quadric
- QSphere
- scale <5.0 13.0 13.0>
- end_quadric
- end_bound
-
- texture
- Red_Marble
- scale <10.0 10.0 10.0>
- ambient 0.4
- diffuse 0.9
- reflection 0.1
- end_texture
-
- colour red 0.8 green 0.8 blue 0.8
-
- end_object
-
- { and finally define the first floor floor }
-
- #declare BaseFloor = object
- intersection
- quadric Cylinder_Y scale <50.0 50.0 50.0> end_quadric
- quadric Cylinder_Y scale <40.0 40.0 40.0> inverse end_quadric
- plane <0.0 1.0 0.0> 2.0 end_plane
- plane <0.0 -1.0 0.0> 2.0 end_plane
- end_intersection
-
- texture
- Red_Marble
- scale <10.0 10.0 10.0>
- ambient 0.4
- diffuse 0.9
- reflection 0.1
- end_texture
-
- colour red 0.8 green 0.8 blue 0.6
-
- end_object
-
- { place a ring of 14 columns with footings around the base }
-
- #declare FullColumn = composite
- object BaseColumn translate <45.0 0.0 0.0> end_object
- object BasePad translate <45.0 -1.0 0.0> end_object
- object BasePad translate <45.0 41.0 0.0> end_object
- object BaseArch translate <45.0 42.0 2.0>
- rotate <0.0 -12.85 0.0> end_object
- end_composite
-
- #declare Level1 = composite
- composite FullColumn end_composite
- composite FullColumn rotate <0.0 -25.7 0.0> end_composite
- composite FullColumn rotate <0.0 -51.4 0.0> end_composite
- composite FullColumn rotate <0.0 -77.1 0.0> end_composite
- composite FullColumn rotate <0.0 -102.8 0.0> end_composite
- composite FullColumn rotate <0.0 -128.5 0.0> end_composite
- composite FullColumn rotate <0.0 -154.2 0.0> end_composite
- composite FullColumn rotate <0.0 -179.9 0.0> end_composite
- composite FullColumn rotate <0.0 -205.6 0.0> end_composite
- composite FullColumn rotate <0.0 -231.3 0.0> end_composite
- composite FullColumn rotate <0.0 -257.0 0.0> end_composite
- composite FullColumn rotate <0.0 -282.7 0.0> end_composite
- composite FullColumn rotate <0.0 -308.4 0.0> end_composite
- composite FullColumn rotate <0.0 -334.1 0.0> end_composite
- composite FullColumn rotate <0.0 -334.1 0.0> end_composite
- object BaseFloor translate <0.0 56.5 0.0> end_object
-
- bounded_by
- intersection
- quadric Cylinder_Y scale <55.0 1.0 55.0> end_quadric
- plane <0.0 -1.0 0.0> 0.0 end_plane
- plane <0.0 1.0 0.0> 60.0 end_plane
- end_intersection
- end_bound
- end_composite
-
- composite Level1 end_composite
-
- { Add the sky to the picture }
- object
- sphere <0.0 0.0 0.0> 300.0 end_sphere
-
- texture
- bozo
- turbulence 0.5
- colour_map
- [0.0 0.6 colour red 0.5 green 0.5 blue 1.0
- colour red 0.5 green 0.5 blue 1.0]
- [0.6 0.8 colour red 0.5 green 0.5 blue 1.0
- colour red 1.0 green 1.0 blue 1.0]
- [0.8 1.001 colour red 1.0 green 1.0 blue 1.0
- colour red 0.8 green 0.8 blue 0.8]
- end_colour_map
- scale <100.0 20.0 100.0>
- ambient 0.8
- diffuse 0.0
- end_texture
-
- colour red 0.5 green 0.5 blue 1.0
-
- end_object
-
- { Define the desert floor }
- object
- plane <0.0 1.0 0.0> -2.0 end_plane
-
- texture
- 0.05 { This value dithers the colours }
- colour red 1.0 green 0.66 blue 0.2
- ripples 0.5
- frequency 2000.0
- scale <50000.0 50000.0 50000.0>
- ambient 0.3
- diffuse 0.7
- end_texture
-
- colour red 1.0 green 0.66 blue 0.2
-
- end_object
-
- { Add a light source }
- object
- sphere <0.0 0.0 0.0> 1.0 end_sphere
-
- translate <60.0 50.0 -110.0>
- texture
- colour White
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- colour White
- end_object
-