home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / morein / wineglas.inc < prev   
Text File  |  1993-02-01  |  3KB  |  125 lines

  1. /*This is a crystal wine glass half filled with red wine. I had some trouble in rendering the wine part so it is commented out. Try it and see if you can make it work.*/
  2.  
  3. #include "colors.inc"
  4. #include "shapes.inc"
  5. #include "textures.inc"
  6.  
  7. /*camera { //un-comment the camera and light source to view or make adjustments
  8.   location  <0 0 -6>
  9.   direction <0 0 1.5>
  10.   up        <0 1 0>
  11.   right     <1.33 0 0>
  12.   look_at   <0 1 1>
  13. }*/
  14.  
  15. /*object {
  16.   light_source {<2 5 -4> color White}
  17. }*/
  18.  
  19. /*object {
  20.   sphere {<0 0 0> 1000}
  21.   texture {color White}
  22. }*/
  23.  
  24. #declare Hollow_Sphere=
  25.   difference {
  26.     sphere {<0 1 0> 1}
  27.     sphere {<0 1 0> .98}
  28.   }
  29.  
  30. #declare Goblet_Top=
  31.   intersection {
  32.     difference {
  33.       Hollow_Sphere
  34.     }
  35.     plane {<0 1 0> -1 translate <0 2.25 0>}
  36.   }
  37.   //texture {color White}
  38.  
  39.  
  40. #declare Wine=
  41.   intersection {
  42.     sphere {<0 1 0> .98}
  43.     plane {<0 1 0> -1 translate <0 1.85 0>}
  44.   }
  45.  
  46.  
  47.  
  48. #declare Stem=
  49.   intersection {
  50.     quadric {
  51.       Cylinder_Y
  52.       scale <.12 1 .12>
  53.     }
  54.     plane {<0 1 0> -1 translate <0 2.5 0>}
  55.     plane {<0 1 0> -1 inverse translate <0 .95 0>}
  56.   }
  57.  
  58.  
  59. #declare Base=
  60.   intersection {
  61.     quadric { QCone_Y scale <2 1 2>}
  62.     plane {<0 1 0> 0}
  63.     plane {<0 1 0> -1 translate <0 .2 0> inverse}
  64.   }
  65.  
  66.  
  67. #declare Wine_Goblet=
  68.   composite {
  69.     object {
  70.       intersection {
  71.         Goblet_Top
  72.         translate <0 1.5 0>
  73.       }
  74.       texture {         //color White}
  75.       color red 1.0 blue 1.0 green 1.0 alpha 1
  76.       reflection 0.15
  77.       refraction 1.0
  78.       specular 1.0
  79.       roughness .001
  80.       ior 1.5
  81.       phong 1 phong_size 200
  82.       }
  83.     }
  84.     object {
  85.       intersection {
  86.         Stem
  87.       }
  88.       texture {            //color White}
  89.       color red 1.0 blue 1.0 green 1.0 alpha 1
  90.       reflection 0.15
  91.       refraction 1.0
  92.       specular 1.0
  93.       roughness .001
  94.       ior 1.5
  95.       phong 1 phong_size 200
  96.       }
  97.     }
  98.     object {
  99.       intersection {
  100.         Base
  101.         scale <.5 .5 .5>
  102.       }
  103.       texture {             
  104.       color red 1.0 blue 1.0 green 1.0 alpha 1
  105.       reflection 0.15
  106.       refraction 1.0
  107.       specular 1.0
  108.       roughness .001
  109.       ior 1.5
  110.       phong 1 phong_size 200
  111.       }
  112.     }
  113.     /*object {
  114.       intersection {
  115.         Wine
  116.         translate <0 1.2 0>
  117.       }
  118.       texture {color red .5 alpha 1
  119.       refraction 1.0
  120.       ior 1.33
  121.       }
  122.     }*/
  123.   }
  124.  
  125. When I tried to render the wine goblet in another scene, I got only a flat disc instead of a half sphere. This file rendered fine. It is an unsolved mystery. If you find the answer, let me know.