home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVSCN.ZIP / LEVEL3.ZIP / POOL.POV < prev    next >
Text File  |  1992-07-03  |  8KB  |  307 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By Dan Farmer
  4. /* Script for a lawn with a swimming pool.
  5.   Written by Dan Farmer.  Takes quite a while to render because of
  6.   the many textures and waveforms used.  An interesting variation of this
  7.   theme would be to change the view to look into the garden globe and see
  8.   the rest of the scene as the reflection in the globe.
  9.  
  10.   As stated below, most of the garden globe structure was taken from the
  11.   file "roman.pov".
  12. */
  13.  
  14. #include "colors.inc"
  15. #include "shapes.inc"
  16. #include "textures.inc"
  17.  
  18. #declare Cube = intersection {
  19.    plane { <0.0 0.0 1.0> 1.0 }
  20.    plane { <0.0 0.0 -1.0> 1.0 }
  21.    plane { <0.0 1.0 0.0> 1.0 }
  22.    plane { <0.0 -1.0 0.0> 1.0 }
  23.    plane { <1.0 0.0 0.0> 1.0 }
  24.    plane { <-1.0 0.0 0.0> 1.0 }
  25.    scale <1.0 1.0 1.0>
  26. }
  27.  
  28. /* Most of the garden globe is borrowed from "roman.dat"*/
  29. /********************************************************/
  30. #declare Beam = quadric { Cylinder_Y
  31.    scale <0.5 20.0 0.5>
  32.    translate <2.0 0.0 0.0>
  33. }
  34.  
  35. /* create a sample column for the base of the structure */
  36. #declare BaseColumn = object {
  37.    intersection {
  38.       union {
  39.          quadric { Beam }
  40.          quadric { Beam rotate <0.0 -25.7  0.0> }
  41.          quadric { Beam rotate <0.0 -51.4  0.0> }
  42.          quadric { Beam rotate <0.0 -77.1  0.0> }
  43.          quadric { Beam rotate <0.0 -102.8 0.0> }
  44.          quadric { Beam rotate <0.0 -128.5 0.0> }
  45.          quadric { Beam rotate <0.0 -154.2 0.0> }
  46.          quadric { Beam rotate <0.0 -179.9 0.0> }
  47.          quadric { Beam rotate <0.0 -205.6 0.0> }
  48.          quadric { Beam rotate <0.0 -231.3 0.0> }
  49.          quadric { Beam rotate <0.0 -257.0 0.0> }
  50.          quadric { Beam rotate <0.0 -282.7 0.0> }
  51.          quadric { Beam rotate <0.0 -308.4 0.0> }
  52.          quadric { Beam rotate <0.0 -334.1 0.0> }
  53.       }
  54.       plane { <0.0 1.0 0.0> 20.0 }
  55.       plane { <0.0 -1.0 0.0> 0.0 }
  56.    }
  57.    bounded_by {
  58.       intersection {
  59.          plane { <0.0 1.0 0.0> 20.0 }
  60.          plane { <0.0 -1.0 0.0> 0.0 }
  61.          quadric {
  62.             Cylinder_Y
  63.             scale <2.51 1.0 2.51>
  64.          }
  65.       }
  66.    }
  67.    texture {
  68.       White_Marble
  69.       scale <10.0 10.0 10.0>
  70.       ambient 0.4
  71.       diffuse 0.9
  72.       reflection 0.1
  73.    }
  74.    colour red 0.8 green 0.0 blue 0.0
  75. }
  76.  
  77. /* and a rectangular pad to serve as a footing for the column */
  78. #declare BasePad = object {
  79.    intersection { Cube
  80.       scale <4.0 1.0 4.0>
  81.    }
  82.    bounded_by {
  83.       quadric {
  84.          Ellipsoid
  85.          scale <10.0 3.0 10.0>
  86.       }
  87.    }
  88.    texture {
  89.       White_Marble
  90.       scale <10.0 10.0 10.0>
  91.       ambient 0.4
  92.       diffuse 0.9
  93.       reflection 0.1
  94.    }
  95.    colour red 0.6 green 0.6 blue 0.4
  96. }
  97.  
  98. #declare Globe = object {
  99.    sphere { <0.0 0.0 0.0> 5.0 }
  100.    texture {
  101.       Mirror
  102.       color Blue
  103.    }
  104.    color Blue
  105. }
  106.  
  107. #declare Garden_Globe = composite {
  108.    object { BaseColumn translate <0.0 0.0 0.0>   }
  109.    object { BasePad    translate <0.0 -1.0 0.0>  }
  110.    object { BasePad    translate <0.0 21.0 0.0>  }
  111.    object { Globe      translate<0.0 26.0 0.0> }
  112. }
  113. /********************* End of Garden Globe Epic *******************************/
  114.  
  115. /* Everybody's gotta have a point of view. */
  116. camera {
  117.    location <0.0  30.0  -120.0>
  118.    direction <0.0 0.0  1.0>
  119.    up  <0.0  1.0  0.0>
  120.    right <1.33333 0.0 0.0>
  121.    look_at <0.0 0.0 0.0>
  122. }
  123.  
  124. /* No, fool... i said _bud_ light! */
  125. object {  
  126.    light_source { <100.0  200.0  -200.0>
  127.       colour White
  128.    }
  129. }
  130.  
  131. /* "The sky was the color of her eyes" */
  132. /*             ... and just as cloudy! */
  133. object {
  134.    sphere { <0.0 -10000.0 -200.0> 15000.0 }
  135.    texture {
  136.       0.05
  137.       Bright_Blue_Sky
  138.       scale <7500.0 1000.0 5000.0>
  139.       ambient 0.7
  140.       diffuse 0.0
  141.    }
  142.    colour red 0.5 green 0.5 blue 1.0
  143. }
  144.  
  145. /* Plant a little grass, well mowed. */
  146. object {
  147.    plane { <0.0 1.0 0.0> 0.0 }
  148.    texture {
  149.       0.05  /* This value dithers the colours */
  150.       color Green
  151.       ripples 0.5
  152.       frequency 2000.0
  153.       scale <50000.0 50000.0 50000.0>
  154.    }
  155.    color Green
  156. }
  157.  
  158. /* Now, we pour the concrete and set the tiles...*/
  159. object {
  160.    difference {
  161.       intersection { Cube
  162.          scale <45.0 10.0 60.0>
  163.       }
  164.       intersection { Cube /* Inside box */
  165.          scale <35.0 11.0 50.0>
  166.       }
  167.    }
  168.    translate <0.0 -8.0 0.0 >
  169.    texture {
  170.       checker colour DarkTurquoise colour White
  171.       scale <2.0 2.0 2.0>
  172.    }
  173.    color DarkTurquoise
  174. }
  175.  
  176. /* Better put some water in the pool! */
  177. object {
  178.    intersection { Cube
  179.       scale <35.0 10.0 50.0>
  180.       translate<0.0 -9.0 0.0>
  181.    }
  182.    texture {
  183.       0.05
  184.       color LightBlue               /*alpha 0.5 ?*/
  185.       ripples 0.5
  186.       frequency 100.0
  187.       scale <5.0 5.0 10.0>
  188.       translate <20.0 4.0 -15.0>    /* Where the ball floats?? */
  189.       reflection 0.5
  190.       brilliance 3.0
  191.       /*??     refraction 1.0        { Doesn't really help the scene any... }
  192.         ior 1.2 ?? */
  193.    }
  194.    color LightBlue
  195. }
  196.  
  197. /* Let's add a diving board */
  198. object {
  199.    union {
  200.       intersection { Cube                        /* The board itself */
  201.          scale <6.0 1.0 30.0 >
  202.          translate <0.0 2.0 -30.0>
  203.       }
  204.       intersection { Cube                        /* a block under the board */
  205.          scale <6.0 2.0 2.0 >
  206.          translate <0.0 1.0 -30.0>
  207.       }
  208.    }
  209.    texture {
  210.       Cherry_Wood
  211.       0.05
  212.       scale <0.02 0.02 0.02>
  213.    }
  214.    color Brown
  215. }
  216.  
  217. /* Float a red and white striped ball in the pool */
  218. object {
  219.    sphere { <0.0 0.0 0.0> 5.0 }
  220.    translate <20.0 4.0 -15.0>    /* Sorta right front center of pool */
  221.    texture {
  222.       gradient < 1.0 1.0 0.0 >
  223.       colour_map {
  224.          [0.00 0.25  colour White colour White ]
  225.          [0.25 0.75  colour red 1.0  colour red 1.0]
  226.          [0.75 1.001 colour White colour White ]
  227.       }
  228.       scale <7.0 7.0 7.0>
  229.       rotate <-30.0 30.0 0.0>
  230.       ambient 0.3
  231.       diffuse 0.7
  232.       phong 0.5
  233.       phong_size 10.0
  234.    }
  235.    color Red
  236. }
  237.  
  238. /* Place the garden globe on left side of pool */
  239. composite { Garden_Globe translate <-60.0 0.0 0.0> }
  240.  
  241. /* The hedge behind the pool */
  242. object {
  243.    intersection { Cube }
  244.    scale <200.0 30.0 30.0>
  245.    translate <-100.0 0.0 180.0>
  246.    texture {
  247.       0.05  /* This value dithers the colours */
  248.       color YellowGreen
  249.       turbulence 0.5
  250.       spotted 0.5
  251.       colour_map {
  252.          [0.00 0.25  colour YellowGreen colour Green ]
  253.          [0.25 0.75  colour Green colour DarkGreen]
  254.          [0.75 1.001 colour DarkGreen colour YellowGreen ]
  255.       }
  256.       wrinkles 1.0
  257.       frequency 2000.0
  258.       scale <10.0 10.0 20.0>
  259.    }
  260.    color YellowGreen
  261. }
  262.  
  263. /* The hedge on the right side of pool */
  264. object {
  265.    intersection { Cube }
  266.    scale <30.0 30.0 100.0>
  267.    translate <100.0 0.0 -85.0>
  268.    texture {
  269.       0.05  /* This value dithers the colours */
  270.       color YellowGreen
  271.       turbulence 0.5
  272.       spotted 0.5
  273.       colour_map {
  274.          [0.00 0.25  colour YellowGreen colour Green ]
  275.          [0.25 0.75  colour Green colour DarkGreen]
  276.          [0.75 1.001 colour DarkGreen colour YellowGreen ]
  277.       }
  278.       wrinkles 1.0
  279.       frequency 2000.0
  280.       scale <10.0 10.0 20.0>
  281.    }
  282.    color YellowGreen
  283. }
  284.  
  285. /* a low, squat shrub of some generic species */
  286. object {
  287.    quadric { Ellipsoid }
  288.    scale <30.0 20.0 25.0>
  289.    translate <-70.0 0.0 110.0>
  290.    texture {
  291.       0.05  /* This value dithers the colours */
  292.       color YellowGreen
  293.       turbulence 0.5
  294.       spotted 1.0
  295.       colour_map {
  296.          [0.00 0.25  colour Khaki colour Green ]
  297.          [0.25 0.50  colour Green colour DarkGreen]
  298.          [0.50 0.75  colour DarkGreen colour MediumForestGreen]
  299.          [0.75 1.001 colour MediumForestGreen colour YellowGreen ]
  300.       }
  301.       wrinkles 1.0
  302.       frequency 2000.0
  303.       scale <5.0 5.0 5.0>
  304.    }
  305.    color YellowGreen
  306. }
  307.