Advertisement
Guest User

Untitled

a guest
Apr 17th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "colors.inc"
  2. #include "textures.inc"      
  3.  
  4. background { color rgb <0.3, 0.9, 1> }
  5.          
  6. light_source{
  7.     <200,300,-150>
  8.     color White
  9. }
  10.  
  11. camera{          //orthographic
  12.     location < 200, 500, -150>
  13.     up<0,1,0>
  14.     right <1.78,0,0>
  15.     look_at  < 200, 100, -150>      
  16.    
  17. }                                
  18.  
  19. plane{
  20.     y,0
  21.     pigment {color rgb <0.3, 1, 0.3>}
  22.     }                                                      
  23.    
  24. ///////////              
  25.  
  26. #macro mur (ilosc_cegiel, liczba_rzedow, glebokosc_zaprawy, odstep, cegla_dlugosc, cegla_wysokosc, cegla_szerokosc)                                  
  27.     intersection{
  28.         union{
  29.             #for (n, 0, liczba_rzedow-1, 1)  
  30.                 #if (mod(n,2)=0) #local nieparzysty=0; #else #local nieparzysty=1; #end  
  31.                 #if (nieparzysty=1) #local ilosc_cegiel=ilosc_cegiel+1; #end
  32.                 #for (i, 0, ilosc_cegiel-1, 1)  
  33.                     box{                    
  34.                         <cegla_dlugosc*i,0,0>, <cegla_dlugosc*(i+1),cegla_wysokosc,cegla_szerokosc>
  35.                         translate <odstep*i,0,0>
  36.                         pigment {color rgb <0.59, 0.086, 0.043>}  
  37.                         translate <nieparzysty*(-cegla_dlugosc/2), (cegla_wysokosc+odstep)*n, 0>
  38.                     }
  39.                 #end      
  40.                 #if (nieparzysty=1) #local ilosc_cegiel=ilosc_cegiel-1; #end
  41.             #end          
  42.            
  43.             box{
  44.                 <0,0.1,0>,
  45.                 <ilosc_cegiel*(cegla_dlugosc+odstep)-odstep-glebokosc_zaprawy*2,
  46.                  liczba_rzedow*(cegla_wysokosc+odstep)-odstep-glebokosc_zaprawy-0.01, cegla_szerokosc-glebokosc_zaprawy*2>
  47.                 pigment {color rgb <0.9, 0.9, 0.9>}
  48.                 translate <glebokosc_zaprawy, 0, glebokosc_zaprawy>
  49.             }
  50.         }  
  51.         box { <0,-0.01,-0.01>, <ilosc_cegiel*cegla_dlugosc+(ilosc_cegiel-1)*odstep,
  52.                         liczba_rzedow*cegla_wysokosc+(liczba_rzedow-1)*odstep+0.01, cegla_szerokosc+0.01>
  53.               pigment {color rgb <0.59, 0.086, 0.043>}
  54.         }
  55.     }  
  56. #end
  57.  
  58. object {
  59.         mur(
  60.         18,      //cegly w rzedzie
  61.         33,      //liczba rzedow
  62.         1,    //glebokosc zaprawy
  63.         1,      //odstep miedzy ceglami
  64.         21,     //dlugosc cegly
  65.         6.5,    //wysokosc cegly
  66.         12,     //szerokosc cegly
  67.         )  
  68. }    
  69. object {mur(18, 33, 1, 1, 21, 6.5, 12)
  70.         translate <0,0,-312>
  71. }    
  72. object {mur(14, 33, 1, 1, 21, 6.5, 12)
  73.         rotate <0,90,0>
  74.         translate <383,0,0>      
  75. }  
  76.  
  77.  
  78. /**difference{
  79.     union{
  80.         **/object {mur(14, 33, 1, 1, 21, 6.5, 12)
  81.             rotate <0,90,0>      
  82.         }   /**
  83.         box {      //framuga okna
  84.         <-5, 90, -55>,
  85.         <14, 225, -245>
  86.         pigment {color rgb <0.96, 0.96, 0.96>}
  87.         }
  88.     }  
  89.     union{
  90.         box {          //okno
  91.             <-6, 98, -63>,
  92.             <15, 217, -98>
  93.             pigment {color rgb <0.96, 0.96, 0.96>}
  94.         }
  95.         box {      //okno
  96.             <-6, 98, -106>,
  97.             <15, 217, -237>  
  98.             pigment {color rgb <0.96, 0.96, 0.96>}
  99.         }
  100.     }
  101. }    
  102.  
  103. union{
  104.     box {   //okno
  105.      <5, 98, -62>,
  106.      <8, 217, -99>
  107.     }
  108.     box {      //okno
  109.      <5, 98, -105>,
  110.      <8, 217, -238>
  111.     }
  112.     pigment {color rgbt <0.18, 0.55, 1, 0.9>}
  113.     finish {reflection 0.2}
  114. }       **/
  115.    
  116. box {  //podłoga
  117.     <1,0,5>,
  118.     <398,2,-305>
  119.     pigment{DMFWood1
  120.         rotate <0, 90, 0>
  121.         scale 20}  
  122.     finish{ phong 0.4
  123.             reflection 0.12}
  124. }
  125.                              
  126. cylinder {
  127.     <0,0,0>,
  128.     <0,5,0>, 15
  129.     translate <37, 2, -25>
  130.     pigment {color rgb <0.7, 0.7, 0.7>}
  131.     normal {onion 3}
  132.     finish {reflection 0.2}
  133. }
  134. cylinder {
  135.     <0,0,0>,
  136.     <0,170,0>,2.5
  137.     translate <37, 2, -25>
  138.     pigment {color rgb <0.7, 0.7, 0.7>}
  139.     normal {onion 3}
  140.     finish {reflection 0.2}
  141. }  
  142. difference{
  143.     cone {
  144.     <0,0,0>, 15
  145.     <0,20,0> 5
  146.     translate <37, 170, -25>
  147.     pigment {color rgb <0.18, 0.95, 0.08>}
  148.     normal {quilted}
  149.     }  
  150.     cone {
  151.     <0,0,0>, 15
  152.     <0,20,0> 5
  153.     translate <37, 165, -25>
  154.     }
  155. }
  156.  
  157. light_source{
  158.     <37, 180, -25>
  159.     color White
  160. }    
  161.  
  162. union{
  163.     union{
  164.         box {
  165.         <0,0,0>,
  166.         <10,80,-10>
  167.         }
  168.         box {
  169.             <180,0,0>,
  170.             <190,80,-10>
  171.         }      
  172.         box {
  173.             <0,0,-60>,
  174.             <10,80,-70>
  175.         }
  176.         box {
  177.             <180,0,-60>,
  178.             <190,80,-70>
  179.         }            
  180.         box {
  181.             <0,0,0>,
  182.             <10,10,-60>
  183.         }        
  184.         box {
  185.             <180,0,0>,
  186.             <190,10,-70>
  187.         }
  188.     finish {phong 1}
  189.     }
  190.     box {
  191.         <0,0,0>,
  192.         <200,5,-90>
  193.         pigment {DMFWood3
  194.             scale 20}
  195.         finish{phong 0.3}
  196.         translate <-10,80,10>
  197. }
  198.  
  199. translate <100, 2, -12>}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement