Advertisement
Talar97

[GK] Lab02

Mar 11th, 2018
2,467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "colors.inc"
  2. #include "stones.inc"
  3. #include "textures.inc"
  4. #include "metals.inc"
  5.  
  6. camera {
  7.     location <0, 8, -10>
  8.     look_at 0
  9.     angle 35
  10. }
  11.  
  12. //Lepsze oświetlenie, dłużej się renderuje
  13. light_source {
  14.     <2, 10, -3>
  15.     color White
  16.     area_light <5, 0, 0>, <0, 0, 5>, 5, 5
  17.     adaptive 1
  18.     jitter
  19. }
  20.  
  21. plane{
  22.     <0,1,0>, -1.5
  23.     pigment { White }
  24. }
  25.  
  26. /*
  27. Robocze oświetlenie i plan
  28. light_source { <40, 50, -50> White }
  29.  
  30. plane { <0,1,0>, -2
  31.     pigment { checker Red White }
  32. } */
  33.  
  34. union{
  35.     difference{
  36.         cylinder{
  37.             <0, 0.27, 0>,
  38.             <0, 0, 0>,
  39.             1.00
  40.         }
  41.        
  42.         cylinder{
  43.             <0, 0.31, 0>,
  44.             <0, -0.1, 0>,
  45.             0.92
  46.             translate <0,0,0>
  47.         }
  48.     }
  49.     difference{
  50.         cylinder{
  51.             <0, 0.25, 0>,
  52.             <0, 0, 0>,
  53.             0.92
  54.             texture { T_Gold_1A }
  55.         }
  56.         cylinder{
  57.             <0, 0.31, 0>,
  58.             <0, -0.1, 0>,
  59.             0.75
  60.             translate <0,0,0>
  61.         }
  62.     }
  63.    
  64.    
  65.     difference{
  66.         cylinder{
  67.             <0, 0.28, 0>,
  68.             <0, 0, 0>,
  69.             0.85
  70.         }
  71.        
  72.         cylinder{
  73.             <0, 0.31, 0>,
  74.             <0, -0.1, 0>,
  75.             0.52
  76.             translate <0.24,0,0>
  77.             scale <0,0,1.15>
  78.         }
  79.         cylinder{
  80.             <0, 0.31, 0>,
  81.             <0, -0.1, 0>,
  82.             0.52
  83.             translate <-0.24,0,0>
  84.             scale <0,0,1.15>
  85.         }
  86.     }
  87.    
  88.     union{
  89.        cylinder{
  90.             <0,3.35,0>,
  91.             <0,0,0>,
  92.             (0.27/2)
  93.         }
  94.        
  95.         sphere{
  96.             <0,3.35,0>,(0.27/2)
  97.         }
  98.        
  99.         torus{
  100.             0.27/2.3,
  101.             0.065
  102.             translate <0,0.25,0>
  103.         }
  104.        
  105.         torus{
  106.             0.27/2.3,
  107.             0.065
  108.             translate <0,0.45,0>
  109.         }
  110.        
  111.         torus{
  112.             0.27/2.3,
  113.             0.065
  114.             translate <0,2.25,0>
  115.         }
  116.        
  117.         union{
  118.             difference{
  119.                 box{
  120.                     <0,0,0>,
  121.                     <0.08,0.63,0.35>
  122.                     rotate <0, 90, 0>
  123.                     translate <0, 2.45, 0.04>
  124.                     //pigment { checker Blue Green }
  125.                 }
  126.                  
  127.                 box{
  128.                     <0,0,0>,
  129.                     <0.15,0.7,0.05>
  130.                     rotate <0, 90, 0>
  131.                     translate <0.2, 2.45, 0.01>
  132.                     texture { T_Gold_2A }
  133.                     //pigment { color Black }
  134.                 }      
  135.         }    
  136.        
  137.             difference{
  138.                 box{
  139.                 <0,0,0>,
  140.                 <0.08, 0.63, 0.23>
  141.                 rotate <0, 90, 0>
  142.                 translate <0.285, 2.45, 0.12>
  143.                 //pigment { checker Red White }
  144.                 }
  145.            
  146.                 box{
  147.                     <0,0,0>,
  148.                     <0.1, 0.15, 0.23>
  149.                     rotate <0, 90, 0>
  150.                     translate <0.435, 2.85, 0.11>
  151.                     texture { T_Gold_1A }
  152.                     //pigment { color Black }
  153.                 }
  154.                
  155.                 box{
  156.                     <-1,0,0>,
  157.                     <0.1, 0.1, 0.23>
  158.                     rotate <0, 90, 0>
  159.                     translate <0.4, 2.52, 0.08>
  160.                     texture { T_Gold_1A }
  161.                 }
  162.                
  163.                 box{
  164.                     <-1,0,0>,
  165.                     <0.1, 0.1, 0.23>
  166.                     rotate <0, 90, 0>
  167.                     translate <0.45, 2.69, 0.08>
  168.                     texture { T_Gold_1A }
  169.                 }
  170.             }
  171.            
  172.             translate<0,0.05,0>
  173.         }
  174.                    
  175.         //rotate <0,0,0>  
  176.         rotate <90,180,0>
  177.         translate <0,0.135,-0.94>
  178.     }
  179.    
  180.     pigment{ color Gold }
  181.     texture { T_Gold_2A }
  182.     finish {
  183.         ambient .2
  184.         diffuse .3
  185.         specular 2
  186.         roughness .03
  187.         metallic
  188.         reflection {
  189.           .85
  190.           metallic
  191.         }
  192.      }
  193.     rotate <0,-16,-10>
  194.     translate<-.5,-1.25,2.5>
  195. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement