Advertisement
Talar97

[GK] Lab01

Mar 5th, 2018
2,541
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 "shapes.inc"
  5. #include "glass.inc"
  6. #include "metals.inc"
  7. #include "woods.inc"
  8.  
  9. camera{
  10.     location    <5, 10, -15>    //Polozenie kamery (wektor)
  11.     look_at <0, 5 , 5>      //Punkt na który patrzy
  12. }    
  13.  
  14. light_source { <3, 10, -10> color rgb<1,1,1>}  
  15.  
  16.  
  17. background { color Blue }    
  18.  
  19.      
  20. fog {
  21.     fog_type 1 //constant_fog
  22.     distance 300.0
  23.     rgb <0.4, 0.4, 0.4>
  24. }          
  25.  
  26. //wektor normalny do plaszczyzny i jej przesuniecie pigment
  27. plane { <0, 3, 0>, -1
  28.     pigment{ color rgb <0.7,0.7,0.7>}
  29.     normal { crackle 1.5 // bump depth
  30.          scale 3 }
  31. }
  32.  
  33.  
  34. //Trzy kulki                
  35. union{
  36.     sphere{
  37.         <0,1,2>,3
  38.         pigment{ color rgb <1,1,1>}
  39.         normal { marble 0.5 scale 0.5 turbulence 1.0}
  40.     }
  41.    
  42.     sphere{
  43.         <0 ,5, 2>,2.5              
  44.         pigment{ color rgb <1,1,1>}
  45.         normal { marble 0.5 scale 0.5 turbulence 1.0}
  46.     }
  47.    
  48.     sphere{
  49.         <0, 8.15, 2>,1.8               
  50.         pigment{ color rgb <1,1,1>}
  51.         normal { marble 0.5 scale 0.5 turbulence 1.0}
  52.     }
  53. }
  54.  
  55.  
  56. //Guziki (od dołu do góry)
  57. sphere{
  58.         <0, 1.99, -0.70>,0.2               
  59.         pigment{ color rgb <0,0,0>}
  60. }
  61. sphere{
  62.         <0, 2.78, -0.35>,0.17              
  63.         pigment{ color rgb <0,0,0>}
  64. }
  65. sphere{
  66.         <0, 4.45, -0.4>,0.17               
  67.         pigment{ color rgb <0,0,0>}
  68. }
  69. sphere{
  70.         <0, 5.35, -0.44>,0.17              
  71.         pigment{ color rgb <0,0,0>}
  72. }
  73.  
  74. sphere{
  75.         <0, 6.15, -0.15>,0.17              
  76.         pigment{ color rgb <0,0,0>}
  77. }
  78.  
  79. //Oczy
  80. sphere{
  81.         <-0.5, 8.5, 0.3>,0.17              
  82.         pigment{ color rgb <0,0,0>}
  83. }
  84. sphere{
  85.         <0.5, 8.5, 0.3>,0.17               
  86.         pigment{ color rgb <0,0,0>}
  87. }
  88.  
  89.  
  90. //Nos
  91. cone{
  92.     <-0.3, 8.15, -1>,0.02
  93.     <0.2, 8.15, 1>,0.23
  94.     rotate <0, 0, 0>
  95.     pigment{ color rgb <1,0,0>}
  96.     normal { bozo 3.00 scale 1}
  97. }
  98.  
  99.  
  100. //Czapeczka
  101. union{
  102.     cylinder{
  103.         <0, 9, 2>,
  104.         <0, 11, 2>,
  105.         1.35
  106.         pigment{ color rgb<0.05, 0.05, 0.05> }
  107.         normal { bumps 0.50 scale 1}
  108.     }
  109.  
  110.     cylinder{
  111.         <0, 9, 2>,
  112.         <0, 9.4, 2>,
  113.         1.75
  114.         pigment{ color rgb<0.15, 0.15, 0.15> }
  115.         normal { bumps 0.50 scale 0.67}
  116.     }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement