home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / polyray / dat / misc / roman.pi < prev    next >
Encoding:
Text File  |  1994-01-23  |  3.8 KB  |  150 lines

  1. // Adapted from: Persistence Of Vision raytracer version 1.0 sample file.
  2. // By Rick Mallett of Carleton University,  Ottowa.
  3. // First stage of the Tower of Pisa 
  4. // Warning:  This picture can take a very long time to ray trace
  5. // due to the large number of objects.  You have been warned :->  
  6. viewpoint {
  7.    from <0, 25, -150>
  8.    at   <0, 40, 0>
  9.    up <0, 1, 0>
  10.    angle 45
  11.    resolution 640, 480
  12.    aspect 4/3
  13.    }
  14.  
  15. // Add a light source
  16. light <60, 100, -110>
  17.  
  18. include "../colors.inc"
  19.  
  20. define red_marble
  21. texture {
  22.    special surface {
  23.       color red_marble_map[marble_fn]
  24.       ambient 0.2
  25.       diffuse 0.8
  26.       specular white, 0.5
  27.       microfacet Reitz 10
  28.       }
  29.    }
  30.  
  31.  
  32. define ground_ripple
  33. texture {
  34.    noise surface {
  35.       color <1, 0.66, 0.2>
  36.       normal 2
  37.       frequency 100
  38.       bump_scale 2
  39.       ambient 0.3
  40.       diffuse 0.7
  41.       }
  42.    }
  43.  
  44. define cloudy_sky
  45. texture {
  46.    special surface {
  47.       ambient 0.9
  48.       diffuse 0
  49.       specular 0
  50.       color color_map(
  51.      [0.0, 0.6, <0.4, 0.4, 0.4>, <1, 1, 1>]
  52.      [0.6, 0.8, <1, 1, 1>, <0.196078, 0.6, 0.8>]
  53.      [0.8, 1.0, <0.196078, 0.6, 0.8>, <0.196078, 0.6, 0.8>])[noise(3*P, 3)]
  54.       }
  55.    }
  56.  
  57. define beam
  58. object { cylinder <2, 0, 0>, <2, 40, 0>, 0.5 }
  59.  
  60. // create a sample column for the base of the structure
  61. define BaseColumn
  62. object {
  63.      beam
  64.    + beam { rotate <0,  25.7, 0> }
  65.    + beam { rotate <0,  51.4, 0> }
  66.    + beam { rotate <0,  77.1, 0> }
  67.    + beam { rotate <0, 102.8, 0> }
  68.    + beam { rotate <0, 128.5, 0> }
  69.    + beam { rotate <0, 154.2, 0> }
  70.    + beam { rotate <0, 179.9, 0> }
  71.    + beam { rotate <0, 205.6, 0> }
  72.    + beam { rotate <0, 231.3, 0> }
  73.    + beam { rotate <0, 257.0, 0> }
  74.    + beam { rotate <0, 282.7, 0> }
  75.    + beam { rotate <0, 308.4, 0> }
  76.    + beam { rotate <0, 334.1, 0> }
  77.    red_marble
  78.    }
  79.  
  80. // a rectangular pad to serve as a footing for the column
  81. define BasePad
  82. object {
  83.    box <-4, -1, -4>, <4, 1, 4>
  84.    red_marble
  85.    }
  86.  
  87. // a basic arch to span the columns
  88. define BaseArch
  89. object {
  90.    (  object { cylinder <-2, 0, 0>, <2, 0, 0>, 12.5 }
  91.     + object { cylinder <-2, 0, 0>, <2, 0, 0>, 8.5 }
  92.     + object { disc <-2, 0, 0>, <-1, 0, 0>, 8.5, 12.5 }
  93.     + object { disc < 2, 0, 0>, < 1, 0, 0>, 8.5, 12.5 })
  94.    & object { disc <0, 0, 0>, <0,-1, 0>, 13 }
  95.    red_marble { rotate <30, 30, 0> }
  96.    }
  97.  
  98. // and finally define the first floor floor
  99. define BaseFloor
  100. object {
  101.      object { cylinder <0, -2, 0>, <0, 2, 0>, 40 }
  102.    + object { cylinder <0, -2, 0>, <0, 2, 0>, 50 }
  103.    + object { disc <0, -2, 0>, <0, -1, 0>, 40, 50 }
  104.    + object { disc <0,  2, 0>, <0,  1, 0>, 40, 50 }
  105.    red_marble
  106.    }
  107.  
  108. // place a ring of 14 columns with footings around the base
  109. define FullColumn
  110. object {
  111.      BaseColumn { translate <45, 0, 0> }
  112.    + BasePad { translate <45, -1, 0> }
  113.    + BasePad { translate <45, 41, 0> }
  114.    + BaseArch { translate <45, 41, 0> rotate <0, -12.85, 0> }
  115.    }
  116.  
  117. define Level1
  118. object {
  119.      FullColumn
  120.    + FullColumn { rotate <0,  25.7, 0> }
  121.    + FullColumn { rotate <0,  51.4, 0> }
  122.    + FullColumn { rotate <0,  77.1, 0> }
  123.    + FullColumn { rotate <0, 102.8, 0> }
  124.    + FullColumn { rotate <0, 128.5, 0> }
  125.    + FullColumn { rotate <0, 154.2, 0> }
  126.    + FullColumn { rotate <0, 179.9, 0> }
  127.    + FullColumn { rotate <0, 205.6, 0> }
  128.    + FullColumn { rotate <0, 231.3, 0> }
  129.    + FullColumn { rotate <0, 257.0, 0> }
  130.    + FullColumn { rotate <0, 282.7, 0> }
  131.    + FullColumn { rotate <0, 308.4, 0> }
  132.    + FullColumn { rotate <0, 334.1, 0> }
  133.    + BaseFloor { translate <0, 56.5, 0> }
  134.    }
  135.  
  136. Level1
  137.  
  138. // Add the sky to the picture
  139. object {
  140.    sphere <0, -1, 0>, 1000
  141.    scale <1, 0.2, 1>
  142.    cloudy_sky { scale <1000, 500, 100> }
  143.    }
  144.  
  145. // Define the desert floor
  146. object {
  147.    disc <0, -1, 0>, <0, 1, 0>, 1001
  148.    ground_ripple { scale <500, 500, 500> }
  149.    }
  150.