home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVSCN.ZIP / LEVEL3.ZIP / WG5.POV < prev   
Text File  |  1992-07-03  |  5KB  |  207 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // Wine glass and chessboard
  4. // Image by Dan Farmer
  5. #include "colors.inc"
  6. #include "shapes.inc"
  7. #include "textures.inc"
  8.  
  9. camera {
  10.    location <50.0  55.0  -75.0>
  11.    direction <0.0 0.0  2.0>
  12.    up  <0.0  1.0  0.0>
  13.    right <1.33333 0.0 0.0>
  14.    look_at <-10.0 18.0 0.0>
  15. }
  16.  
  17. object {
  18.    light_source { <10.0  50.0  50.0>
  19.       colour White
  20.    }
  21. }
  22. object {
  23.    light_source { <-35.0  30.0  -150.0>
  24.       colour White
  25.    }
  26. }
  27.  
  28. #declare Glass = texture {
  29.    color red 1.0 green 1.0 blue 1.0 alpha 1.0
  30.    ambient 0.0
  31.    diffuse 0.0
  32.    reflection 0.1
  33.    refraction 1.0
  34.    ior 1.33
  35.    phong 0.3
  36.    phong_size 90
  37. }
  38.  
  39. #declare Wine = color red 1.0 alpha 0.85
  40. #declare Liquid = texture {
  41.    reflection 0.05
  42.    refraction 1.0
  43.    ior 1.2
  44. }
  45.  
  46. #declare Bead = object {
  47.    quadric { Ellipsoid scale <1.65 0.65 1.65> }
  48.    color red 1.0 blue 1.0
  49.    texture { Glass2 }
  50. }
  51.  
  52. /*
  53.    Torus generated using Truman's Torus Generator 1.0 (c) 1991 Truman Brown
  54.    Torus specs:                                                                  
  55.       Major radius: 0.975000
  56.       Minor radius: 0.025000
  57.       Outer radius: 1.000000
  58.       Inner radius: 0.950000
  59. */
  60.  
  61. #declare Rim = object {
  62.    quartic {
  63.       <    1.000000 0.000000 0.000000 0.000000 2.000000
  64.       0.000000 0.000000 2.000000 0.000000 -1.902500
  65.       0.000000 0.000000 0.000000 0.000000 0.000000
  66.       0.000000 0.000000 0.000000 0.000000 0.000000
  67.       1.000000 0.000000 0.000000 2.000000 0.000000
  68.       1.900000 0.000000 0.000000 0.000000 0.000000
  69.       1.000000 0.000000 -1.902500 0.000000 0.902500 >
  70.    }
  71.    clipped_by { plane { <0.0 -1.0 0.0> 0.0 } }
  72.    scale <15.0 10.0 15.0>
  73.    translate <0.0 24.0 0.0>
  74.    color red 1.0
  75.    texture { Gold_Texture }
  76. }
  77.  
  78. #declare Top = object {
  79.    intersection {
  80.       plane { <0.0 1.0 0.0> 1.0  }
  81.       quadric { QCone_Y }
  82.       quadric { QCone_Y scale <0.97 1.0 0.97> inverse }
  83.    }
  84.    clipped_by {
  85.       plane { <0.0 1.0  0.0> 0.0  inverse }
  86.    }
  87.    scale <15.0 10.0 15.0>
  88.    translate <0.0 14.0 0.0>
  89.    color green 1.0
  90.    texture { Glass }
  91. }
  92.  
  93. #declare Stem = object {
  94.    quadric { Cylinder_Y }
  95.    clipped_by {
  96.       plane { <0.0 1.0 0.0> -1.0 inverse }
  97.       plane { <0.0 1.0 0.0>  1.0 }
  98.    }
  99.    scale <1.0 12.0 1.0>
  100.    translate <0.0 6.0 0.0>
  101.    color blue 1.0
  102.    texture { Glass2 }
  103. }
  104.  
  105.  
  106. #declare Base = object {
  107.    quadric { QCone_Y }
  108.    clipped_by {
  109.       plane { <0.0 1.0  0.0> 0.0  }
  110.       plane { <0.0 1.0 0.0> -1.0 inverse }
  111.    }
  112.    translate <0.0 1.0 0.0>   /* This actually puts the base of the cone on y=0*/
  113.    scale <12.0 3.25 12.0>
  114.    translate <0.0 0.0 0.0> /*Does nothing: just for clarity */
  115.    color red 1.0 green 1.0
  116.    texture { Glass2 }
  117. }
  118.  
  119. #declare Wine = object {
  120.    intersection {
  121.       plane { <0.0 1.0 0.0> 0.9
  122.       }
  123.       quadric { QCone_Y scale <0.95 1.0 0.95> }
  124.    }
  125.    clipped_by {
  126.       plane { <0.0 1.0  0.0> 0.0  inverse
  127.       }
  128.    }
  129.    scale <14.9 10.0 14.9>
  130.    translate <0.0 14.0 0.0>
  131.    color White
  132.    texture { Liquid
  133.       color Wine
  134.    }
  135. }
  136.  
  137. /* Ground plane */
  138. object {
  139.    plane { <0.0 1.0 0.0> -0.0 }
  140.    color DimGray
  141.    texture { 0.2 color RichBlue }
  142. }
  143.  
  144. #declare Frame = object {
  145.    union {
  146.       intersection { Disk_X    /* Front rounded edge */
  147.          scale <240.0 4.5 4.5>
  148.          translate<-120.0 0.0 -120.0>
  149.       }
  150.       intersection { Disk_Z    /* Left rounded edge */
  151.          scale <4.5 4.5 240.0>
  152.          translate <-120.0 0.0 -120.0>
  153.       }
  154.       intersection { Disk_X    /* Rear rounded edge */
  155.          scale <240.0 4.5 4.5>
  156.          translate<-120.0 0.0 +120.0>
  157.       }
  158.       intersection { Disk_Z    /* Right rounded edge */
  159.          scale <4.5 4.5 240.0>
  160.          translate <+120.0 0.0 -120.0>
  161.       }
  162.    }
  163.    color red 1.0
  164.    texture { Silver_Texture }
  165. }
  166.  
  167. #declare ChessBoard = object {
  168.    intersection { Cube
  169.       scale <120.0 4.0 120.0>
  170.    }
  171.    color Cyan
  172.    texture { White_Marble scale <20.0 1.0 20.0> reflection 0.12 }
  173.    texture { checker color Black color White alpha 1.0
  174.       scale <30.0 4.001 30.0>
  175.       reflection 0.12
  176.    }
  177. }
  178.  
  179.  
  180. #declare WineGlass = composite {
  181.    object { Rim   }
  182.    object { Wine  }
  183.    object { Top   }
  184.    object { Bead  translate <0.0 14.5 0.0> }
  185.    object { Bead  translate <0.0 10.0 0.0> }
  186.    object { Bead  translate <0.0  7.0 0.0> }
  187.    object { Bead  translate <0.0  3.0 0.0> }
  188.    object { Stem  }
  189.    object { Base  }
  190.    bounded_by {
  191.       intersection { Disk_Y
  192.          scale <15.5 25.0 15.5>
  193.       }
  194.    }
  195.    scale <1.0 1.50 1.0>
  196. }
  197.  
  198. composite {
  199.    object { Frame }
  200.    object { ChessBoard }
  201.    translate <0.0 4.0 145.0>
  202. }
  203.  
  204. composite { WineGlass }
  205.  
  206. /*End of file */
  207.