home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / morein / bottle.inc next >
Text File  |  1993-02-01  |  3KB  |  112 lines

  1. /*This is a data file for a green wine bottle with a cork in it. It requires an image_map for the label. I used one I made in Corel Draw, you will have to supply your own.*/ 
  2.  
  3. #include "colors.inc"
  4. #include "shapes.inc"
  5. #include "textures.inc"
  6.  
  7. /*camera { //un-comment the camera and light source to make adjustments
  8.   location  <0 .5 -2>
  9.   direction <0 0 1.5>
  10.   up        <0 1 0>
  11.   right     <1.33 0 0>
  12.   look_at   <0 .5 2>
  13. }*/
  14.  
  15. /*object {
  16.   light_source {<-4 5 -4> color White}
  17. }*/
  18.  
  19. /*object { //makes the bottle easier to see
  20.   sphere {<0 0 0> 1000}
  21.   texture {color White}
  22. }*/
  23.  
  24. declare Wine_Bottle=
  25. composite {
  26.   object {          //bottom of bottle
  27.     intersection {
  28.       quadric { Cylinder_Y scale <.35 1 .35>}
  29.       plane {<0 1 0> -1 translate <0 1 0>}
  30.       plane {<0 1 0>-1 inverse translate <0 .5 0>}
  31.       //sphere {<0 0 0> .5}
  32.     }
  33.     texture {
  34.       color green 1.0 alpha 0.5
  35.       specular 1.0
  36.       refraction 1.0
  37.       reflection .15
  38.       roughness .001
  39.       ior 1.5
  40.       phong 1 phong_size 80
  41.     }
  42.   }
  43.   object { //this is the middle of the bottle with the lable
  44.     intersection {
  45.       quadric { Cylinder_Y scale <.35 1 .35>}
  46.       plane {<0 1 0> -1 translate <0 1.75 0>}
  47.       plane {<0 1 0> -1 inverse translate <0 1 0>}
  48.     }
  49.     texture {              //color White}
  50.           image_map {gif "gallo.gif" map_type 2 interpolate 4} //substitute your own gif
  51.         scale <.2 .8 .2>
  52.         rotate <0 -90 0>
  53.         translate <0 -.025 0>
  54.     }
  55.   }
  56.   object {  //this is the neck of the bottle
  57.     intersection {
  58.       quadric { Hyperboloid_Y scale <.1 1 .1> translate <0 2.35 0>}
  59.       plane {<0 1 0> -1 translate <0 2.65 0>}
  60.       plane {<0 1 0> -1 inverse translate <0 2 0>}
  61.     }
  62.     texture {
  63.       color green 1.0 alpha 0.5
  64.       specular 1.0
  65.       refraction 1.0
  66.       reflection .15
  67.       roughness .001
  68.       ior 1.5
  69.       phong 1 phong_size 80
  70.     }
  71.   }
  72.   object {   //this is the base of the neck
  73.     sphere {<0 .75 0> .35}
  74.     texture {
  75.       color green 1.0 alpha 0.5
  76.       specular 1.0
  77.       refraction 1.0
  78.       reflection .15
  79.       roughness .001
  80.       ior 1.5
  81.       phong 1 phong_size 80
  82.     }
  83.   }
  84.   object {   //this is the neck of the bottle
  85.     intersection {
  86.       quadric {Cylinder_Y scale <.15 1 .15> }
  87.       plane {<0 1 0> -1 translate <0 2.85 0>}
  88.       plane {<0 1 0> -1 inverse translate <0 2.65 0>}
  89.     }
  90.     texture {
  91.       color green 1.0 alpha 0.5
  92.       specular 1.0
  93.       refraction 1.0
  94.       reflection .15
  95.       roughness .001
  96.       ior 1.5
  97.       phong 1 phong_size 80
  98.     }
  99.   }
  100.   object {   //this is the cork
  101.     intersection {
  102.       quadric {Cylinder_Y scale <.12 1 .12>}
  103.       plane {<0 1 0> -1 translate <0 3 0>}
  104.       plane {<0 1 0> -1 inverse translate <0 2.85 0>}
  105.     }
  106.     texture {
  107.       color Tan
  108.       bumps .1
  109.     }
  110.   }
  111. }
  112.