home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / PVDAT.ZIP / ROMAN.DAT < prev    next >
Encoding:
Text File  |  1991-09-07  |  6.8 KB  |  251 lines

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