Advertisement
Guest User

Untitled

a guest
Mar 16th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #macro Glass_01( G_R, // radius of glass
  2.                  G_H, // height of glass
  3.                ) //------------------------
  4.  
  5. difference{
  6.  cylinder{<0,      0,0>,<0,G_H   ,0>,G_R }
  7.  cylinder{<0,G_R*.05,0>,<0,G_H+.1,0>,G_R*.9}
  8. } // end of difference
  9.  
  10.  
  11. #end // end of macro
  12. //-----------------------------------------
  13. //-----------------------------------------
  14.  
  15.  
  16. global_settings{max_trace_level 10}
  17. //-----------------------------------------
  18. union{
  19.  
  20.  object{ Glass_01( 1, // radius of glass
  21.                    3, // height of glass
  22.                 ) //-----------------------
  23.         material{
  24.          texture{
  25.           pigment{ rgbf<.98,.98,.98,0.85>*1}
  26.           finish { ambient 0.0
  27.                    diffuse 0.15
  28.                    reflection 0.2
  29.                    specular 0.6
  30.                    roughness 0.005
  31.                   // phong 1
  32.                   // phong_size 400
  33.                    reflection { 0.03, 1.0 fresnel on }
  34.                 //   conserve_energy
  35.                  }
  36.           } // end of texture
  37.  
  38.           interior{ ior 1.5
  39.                     fade_power 1001
  40.                     fade_distance 0.5
  41.                     fade_color <0.8,0.8,0.8>
  42.                   } // end of interior
  43.  
  44.  
  45.         } // end of material
  46.   } // end glass
  47.  
  48. // water
  49. intersection{
  50.  cylinder{<0,0,0>,<0,0.30*0.75,0>,0.14  
  51.         material{
  52.          texture{
  53.           pigment{ rgbf<.93,.95,.98,0.9>*0.95}
  54.           normal { ripples 1.35 scale 0.0125 turbulence 0.3 translate<-0.05,0,0> rotate<0,-20,0>}
  55.           finish { ambient 0.0
  56.                    diffuse 0.15
  57.                    reflection 0.2
  58.                    specular 0.6
  59.                    roughness 0.005
  60.                   // phong 1
  61.                   // phong_size 400
  62.                    reflection { 0.2, 1.0 fresnel on }
  63.                    conserve_energy
  64.                  }
  65.            } // end of texture
  66.          
  67.           interior{ ior 1.33
  68.                     fade_power 1001
  69.                     fade_distance 0.5
  70.                     fade_color <0.8,0.8,0.8>
  71.                 } // end of interior
  72.         } // end of material
  73.    } //
  74.  
  75.  cylinder{<0,0.14*0.051,0>,<0,1,0>,0.54*0.90 *0.999 //<0,0.14*0.051,0>,<0,1,0>,0.14*0.90 *0.999  
  76.         material{
  77.          texture{
  78.           pigment{ rgbf<.93,.95,.98,0.825>*0.99}
  79.          //  normal { ripples 0.5 scale 0.025 turbulence 0.1 translate<-0.05,0,0> rotate<0,-20,0>}
  80.           finish { ambient 0.0
  81.                    diffuse 0.15
  82.                    reflection 0.2
  83.                    specular 0.6
  84.                    roughness 0.005
  85.                   // phong 1
  86.                   // phong_size 400
  87.                    reflection { 0.17, 1.0 fresnel on }
  88.                    conserve_energy
  89.                  }
  90.            } // end of texture
  91.          
  92.           interior{ ior 1.33
  93.                     fade_power 1001
  94.                     fade_distance 0.5
  95.                     fade_color <0.8,0.8,0.8>
  96.                 } // end of interior
  97.         } // end of material
  98.          } //          
  99.  }// end water
  100.   translate< -5,0,-3 >
  101. } //------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement