home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / pvrayfiles / SceneFiles / RomanB < prev   
Text File  |  1988-06-16  |  7KB  |  263 lines

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By ???
  4. // Revamped by Brian
  5.  
  6. // Later stages of the Tower of Pisa 
  7. // warning:  This picture can take a very long time to ray trace
  8. // due to the large number of objects.  You have been warned :-<  
  9.  
  10. #include "<PVray$Dir>.dat.shapes"
  11. #include "<PVray$Dir>.dat.colors"
  12. #include "<PVray$Dir>.dat.textures"
  13.  
  14. view_point
  15.    location <0.0 25.0 -350.0>
  16.    direction <0.0 0.1 1.0>
  17.    up <0.0 1.0 0.0>
  18.    right <1.3333 0.0 0.0>
  19. end_view_point
  20.  
  21. #declare Sandstone = texture
  22.    granite
  23.    0.05
  24.    colour_map
  25.       [ 0.0 0.3   colour Khaki colour Khaki ]
  26.       [ 0.3 0.6   colour Khaki colour Sienna ]
  27.       [ 0.6 1.001 colour Khaki colour Salmon ]
  28.    end_colour_map
  29. end_texture
  30.  
  31. #declare Beam = quadric Cylinder_Y
  32.     scale <0.5 20.0 0.5>
  33.     translate <2.0 0.0 0.0>
  34. end_quadric
  35.  
  36. { create a sample column for the base of the structure }
  37.  
  38. #declare BaseColumn = object
  39.    intersection
  40.       union
  41.          quadric Beam end_quadric
  42.          quadric Beam rotate <0.0 -25.7  0.0> end_quadric
  43.          quadric Beam rotate <0.0 -51.4  0.0> end_quadric
  44.          quadric Beam rotate <0.0 -77.1  0.0> end_quadric
  45.          quadric Beam rotate <0.0 -102.8 0.0> end_quadric
  46.          quadric Beam rotate <0.0 -128.5 0.0> end_quadric
  47.          quadric Beam rotate <0.0 -154.2 0.0> end_quadric
  48.          quadric Beam rotate <0.0 -179.9 0.0> end_quadric
  49.          quadric Beam rotate <0.0 -205.6 0.0> end_quadric
  50.          quadric Beam rotate <0.0 -231.3 0.0> end_quadric
  51.          quadric Beam rotate <0.0 -257.0 0.0> end_quadric
  52.          quadric Beam rotate <0.0 -282.7 0.0> end_quadric
  53.          quadric Beam rotate <0.0 -308.4 0.0> end_quadric
  54.          quadric Beam rotate <0.0 -334.1 0.0> end_quadric
  55.      end_union
  56.  
  57.      plane <0.0 1.0 0.0> 40.0 end_plane
  58.      plane <0.0 -1.0 0.0> 0.0 end_plane
  59.    end_intersection
  60.  
  61.    bounded_by
  62.      intersection
  63.         plane <0.0 1.0 0.0> 40.0 end_plane
  64.         plane <0.0 -1.0 0.0> 0.0 end_plane
  65.          quadric
  66.             Cylinder_Y
  67.             scale <2.51 1.0 2.51>
  68.          end_quadric
  69.      end_intersection
  70.    end_bound
  71.  
  72.    texture
  73.      Sandstone
  74.      scale <2.0 2.0 2.0>
  75.      ambient 0.4
  76.      diffuse 0.9
  77.    end_texture
  78.  
  79.    colour red 0.8 green 0.0 blue 0.0
  80.  
  81. end_object
  82.  
  83. { and a rectangular pad to serve as a footing for the column }
  84.  
  85. #declare BasePad = object
  86.    intersection
  87.       plane <0.0 1.0 0.0> 1.0 end_plane
  88.       plane <0.0 -1.0 0.0> 1.0 end_plane
  89.       plane <0.0 0.0 1.0> 4.0 end_plane
  90.       plane <0.0 0.0 -1.0> 4.0 end_plane
  91.       plane <1.0 0.0 0.0> 4.0 end_plane
  92.       plane <-1.0 0.0 0.0> 4.0 end_plane
  93.    end_intersection
  94.  
  95.    bounded_by
  96.       quadric
  97.          QSphere
  98.          scale <10.0 3.0 10.0>
  99.       end_quadric
  100.    end_bound
  101.  
  102.    texture
  103.      Sandstone
  104.      scale <2.0 2.0 2.0>
  105.      ambient 0.4
  106.      diffuse 0.9
  107.    end_texture
  108.  
  109.    colour red 0.6 green 0.6 blue 0.4
  110.  
  111. end_object
  112.  
  113. { and define a basic arch to span the columns }
  114.  
  115. #declare BaseArch = object
  116.    intersection
  117.       quadric Cylinder_X scale <1.0 12.5 12.5> end_quadric
  118.       quadric Cylinder_X scale <1.0 8.5 8.5> inverse end_quadric
  119.       plane <1.0 0.0 0.0> 2.0 end_plane
  120.       plane <-1.0 0.0 0.0> 2.0 end_plane
  121.       plane <0.0 -1.0 0.0> 0.0 end_plane
  122.    end_intersection
  123.  
  124.    bounded_by
  125.       quadric
  126.          QSphere
  127.          scale <5.0 13.0 13.0>
  128.       end_quadric
  129.    end_bound
  130.  
  131.    texture
  132.      Sandstone
  133.      scale <2.0 2.0 2.0>
  134.      ambient 0.4
  135.      diffuse 0.9
  136.    end_texture
  137.  
  138.    colour red 0.8 green 0.8 blue 0.8
  139.  
  140. end_object
  141.  
  142. { and finally define the first floor floor }
  143.  
  144. #declare BaseFloor = object
  145.    intersection
  146.       quadric Cylinder_Y scale <50.0 50.0 50.0> end_quadric
  147.       plane <0.0 1.0 0.0> 2.0 end_plane
  148.       plane <0.0 -1.0 0.0> 2.0 end_plane
  149.    end_intersection
  150.  
  151.    texture
  152.      Sandstone
  153.      scale <2.0 2.0 2.0>
  154.      ambient 0.4
  155.      diffuse 0.9
  156.    end_texture
  157.  
  158.    colour red 0.8 green 0.8 blue 0.6
  159.  
  160. end_object
  161.  
  162. { place a ring of 14 columns with footings around the base }
  163.  
  164. #declare FullColumn = composite
  165.    object BaseColumn translate <45.0 0.0 0.0>   end_object
  166.    object BasePad    translate <45.0 -1.0 0.0>  end_object
  167.    object BasePad    translate <45.0 41.0 0.0>  end_object
  168.    object BaseArch   translate <45.0 42.0 2.0>
  169.                      rotate <0.0 -12.85 0.0>     end_object
  170. end_composite
  171.  
  172. #declare Level1 = composite
  173.    composite FullColumn end_composite
  174.    composite FullColumn rotate <0.0 -25.7  0.0> end_composite
  175.    composite FullColumn rotate <0.0 -51.4  0.0> end_composite
  176.    composite FullColumn rotate <0.0 -77.1  0.0> end_composite
  177.    composite FullColumn rotate <0.0 -102.8 0.0> end_composite
  178.    composite FullColumn rotate <0.0 -128.5 0.0> end_composite
  179.    composite FullColumn rotate <0.0 -154.2 0.0> end_composite
  180.    composite FullColumn rotate <0.0 -179.9 0.0> end_composite
  181.    composite FullColumn rotate <0.0 -205.6 0.0> end_composite
  182.    composite FullColumn rotate <0.0 -231.3 0.0> end_composite
  183.    composite FullColumn rotate <0.0 -257.0 0.0> end_composite
  184.    composite FullColumn rotate <0.0 -282.7 0.0> end_composite
  185.    composite FullColumn rotate <0.0 -308.4 0.0> end_composite
  186.    composite FullColumn rotate <0.0 -334.1 0.0> end_composite
  187.    composite FullColumn rotate <0.0 -334.1 0.0> end_composite
  188.    object BaseFloor translate <0.0 56.5 0.0>   end_object
  189.  
  190.    bounded_by
  191.       intersection 
  192.          quadric Cylinder_Y scale <55.0 1.0 55.0> end_quadric
  193.          plane <0.0  -1.0  0.0> 0.0 end_plane
  194.          plane <0.0  1.0   0.0> 60.0 end_plane
  195.       end_intersection
  196.    end_bound
  197. end_composite
  198.  
  199. composite
  200.    composite Level1 end_composite
  201.    composite Level1 translate <0.0 60.5 0.0> end_composite
  202.    composite Level1 translate <0.0 121.0 0.0> end_composite
  203.    composite Level1 translate <0.0 181.5 0.0> scale <0.8 0.8 0.8> end_composite           
  204.    rotate <0.0 0.0 15.0>
  205.    translate <0.0 -15.0 0.0>
  206. end_composite
  207. { Add the sky to the picture }
  208. object
  209.    sphere <0.0 0.0 0.0> 500.0 end_sphere
  210.  
  211.    texture
  212.       bozo
  213.       turbulence 0.5
  214.       colour_map
  215.           [0.0 0.6  colour red 0.5 green 0.5 blue 1.0
  216.                     colour red 0.5 green 0.5 blue 1.0]
  217.           [0.6 0.8 colour red 0.5 green 0.5 blue 1.0
  218.                     colour red 1.0 green 1.0 blue 1.0]
  219.           [0.8 1.001 colour red 1.0 green 1.0 blue 1.0
  220.                      colour red 0.8 green 0.8 blue 0.8]
  221.       end_colour_map
  222.       scale <400.0  125.0  125.0>
  223.       translate <500.0 1000.0 250.0>
  224.       ambient 0.8
  225.       diffuse 0.0
  226.    end_texture
  227.  
  228.    colour red 0.5 green 0.5 blue 1.0
  229.  
  230. end_object
  231.  
  232. { Define the desert floor }
  233. object
  234.    plane <0.0 1.0 0.0> -2.0 end_plane
  235.  
  236.    texture
  237.       0.05  { This value dithers the colours }
  238.       colour red 1.0 green 0.66 blue 0.2
  239.       ripples 0.5
  240.       frequency 2000.0
  241.       scale <50000.0 50000.0 50000.0>
  242.       ambient 0.3
  243.       diffuse 0.7
  244.    end_texture
  245.  
  246.    colour red 1.0 green 0.66 blue 0.2
  247.  
  248. end_object
  249.  
  250. { Add a light source }
  251. object
  252.     sphere <0.0 0.0 0.0> 1.0 end_sphere
  253.  
  254.     translate <60 250 -110>
  255.     texture
  256.       colour White
  257.       ambient 1.0
  258.       diffuse 0.0
  259.     end_texture
  260.     light_source
  261.     colour White
  262. end_object
  263.