Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "colors.inc"
  2. #include "functions.inc"
  3. #include "textures.inc"
  4. #include "metals.inc"
  5. #include "rad_def.inc"
  6. //global_settings{
  7. //    max_trace_level 20
  8. //    assumed_gamma 1
  9. //    radiosity{
  10. //        recursion_limit 1
  11. //    }
  12. //}  
  13. #ifndef( E ) #declare E = 0.00001; #end
  14. global_settings {
  15.         radiosity {
  16.                 Rad_Settings(Radiosity_Normal , off, off)
  17.         }                                            
  18. }                                                    
  19.  
  20. union{
  21.     plane{y,0}
  22.     plane{z,1}
  23.     texture{pigment{White} finish{ambient 0 diffuse 1}}
  24. }
  25.  
  26. camera {
  27.   location  <0.0, 0.7, -3.5>
  28.   direction 1.5*z
  29.   right     x*image_width/image_height
  30.   look_at   <0.0, 0.8,  0.0>
  31. }
  32.        
  33. #declare Tekstura_lampa=texture{
  34.     pigment{
  35.         bozo warp { turbulence 0.6 }
  36.         color_map{
  37.            [0 rgbf<1,0.8,0,0.3>]
  38.            [1 rgbf<1,0.8,0,0.7>]
  39.         }
  40.     }
  41.     finish{ambient 0 diffuse 0.8 specular 0.05 roughness 0.01}
  42. }
  43.  
  44. #declare Tekstura_podstawa=texture{
  45.     pigment{rgb <0.8,0.8,0.9>*0.5}
  46.     normal{agate bump_size 0.3 scale 0.01}
  47.     finish{metallic brilliance 3 ambient 0 diffuse 1 specular 1 roughness 0.05
  48.         reflection{0,0.2}
  49.     }
  50. }
  51.  
  52. #declare Kolumna=isosurface{
  53.         function{f_helix1(x,y,z,1,100,0.01,0.016,1.5,1,0)}
  54.         contained_by {box {<-1,0,-1>,<1,0.73,1>}}
  55.        
  56.     // Seven extra parameters required:
  57.     // 1. Number of helixes - e.g. 2 for a double helix
  58.     // 2. Period - is related to the number of turns per unit length
  59.     // 3. Minor radius
  60.     // 4. Major radius
  61.     // 5. Shape parameter. If this is greater than 1 then the tube becomes fatter in the y direction
  62.     // 6. Cross section type.
  63.     // 7. Cross section rotation angle (degrees). E.g. if you choose a square cross section and rotate it by 45 degrees you get a diamond cross section.
  64.  
  65. }                  
  66.  
  67.  
  68. #declare Zarowka = union {
  69.     merge {
  70.       sphere { <0,0,0>,1 }
  71.       cylinder {
  72.         <0,0,1>, <0,0,0>, 1
  73.         scale <0.35, 0.35, 1.0>
  74.         translate  0.45*z
  75.       }
  76.       texture {
  77.         pigment {color rgb <1, 1, 1>}
  78.         finish {ambient 4.5 diffuse 0.1}
  79.       }
  80.     }
  81.     cylinder {
  82.       <0,0,1>, <0,0,0>, 1
  83.       scale <0.4, 0.4, 0.5>
  84.       texture { Brass_Texture }
  85.       translate  1.5*z
  86.     }
  87.     rotate 90*x
  88.     scale 0.3
  89. }
  90.  
  91. #declare Swiatlo=light_source {<0,0,0>
  92.     color rgb<1,0.8,0.6>*15
  93.         area_light 0.15*x,z*0.15 6, 6 jitter adaptive 1 circular orient
  94.     fade_distance 0.3
  95.     fade_power 2
  96.     looks_like { Zarowka }
  97. }      
  98.  
  99. #declare Lampa =
  100. union{
  101.     #declare rDol = 1.3;
  102.     #declare rGora = 0.7;
  103.     difference{
  104.         cone{<0,3,0> rDol, <0,5,0> rGora }
  105.         cone{<0,3-E,0> rDol-0.05, <0,5+E,0> rGora-0.05}
  106.         texture{Tekstura_lampa scale 0.4}
  107.         interior{
  108.             media{
  109.                 scattering {1,3}
  110.             }
  111.         }
  112.        hollow
  113.     }  
  114.        
  115.     union{
  116.         torus { rDol-0.02, 0.05   translate <0,3,0>}
  117.         torus{rGora-0.02,0.05  translate <0,5,0>}
  118.        
  119.         #declare i=0;
  120.         #while (i<4)
  121.             cylinder{<rDol,3,0>,<0,3.2,0> ,0.05 rotate y*360*i/4}
  122.             #declare i=i+1;
  123.         #end
  124.  
  125.         texture{T_Brass_2A}
  126.                 //no_shadow
  127.     }
  128.    
  129.             object{Swiatlo translate 3.95*y }
  130.    
  131. }                    
  132.        
  133.  
  134. #declare Promien=0.3;
  135. #declare Stopa = prism {
  136. linear_sweep
  137. bezier_spline
  138. 0,
  139. 0.5,
  140. 44
  141. <2.85526315789474,2>,<2.69736842105263,1.06578947368421>,<3.65789473684211,0.947368421052632>,<3.88815789473684,1.72368421052632>
  142. <3.88815789473684,1.72368421052632>,<3.96710526315789,2.26315789473684>,<3.92763157894737,2.46710526315789>,<3.67763157894737,2.65131578947368>
  143. <3.67763157894737,2.65131578947368>,<3.24342105263158,2.76973684210526>,<1.43421052631579,2.875>,<1.04605263157895,2.83552631578947>
  144. <1.04605263157895,2.83552631578947>,<0.296052631578947,2.89473684210526>,<0.230263157894737,3.26315789473684>,<0.190789473684211,3.65131578947368>
  145. <0.190789473684211,3.65131578947368>,<0.302631578947368,4.36184210526316>,<0.855263157894737,4.38157894736842>,<1.125,4.42105263157895>
  146. <1.125,4.42105263157895>,<0.842105263157895,4.21052631578947>,<0.730263157894737,4.18421052631579>,<0.618421052631579,4.09868421052632>
  147. <0.618421052631579,4.09868421052632>,<0.447368421052632,3.96052631578947>,<0.151315789473684,3.68421052631579>,<0.572368421052632,3.17763157894737>
  148. <0.572368421052632,3.17763157894737>,<0.802631578947368,2.91447368421053>,<1.92763157894737,3.21052631578947>,<3.76315789473684,2.82236842105263>
  149. <3.76315789473684,2.82236842105263>,<4.27631578947368,2.44078947368421>,<4.07236842105263,1.69078947368421>,<4,1.40789473684211>
  150. <4,1.40789473684211>,<3.71710526315789,1.01315789473684>,<3.20394736842105,0.980263157894737>,<2.94078947368421,1.21710526315789>
  151. <2.94078947368421,1.21710526315789>,<2.63157894736842,1.33552631578947>,<2.79605263157895,1.95394736842105>,<2.85526315789474,2>
  152.  
  153.        
  154.        
  155.        
  156.  
  157.     rotate -x*90
  158.     rotate y*90
  159.     scale Promien
  160.     texture { Tekstura_podstawa }
  161. }                    
  162.  
  163. #declare Srednica = -0.1;
  164.  
  165. #declare Podstawa = union{
  166. object {Stopa translate <0.08,-0.3,Srednica>}
  167. object {Stopa translate <0.08,-0.3,Srednica> rotate   0*y }
  168. object {Stopa translate <0.08,-0.3,Srednica> rotate 180*y }
  169. object {Stopa translate <0.08,-0.3,Srednica> rotate 270*y }
  170.  
  171.  
  172. box {
  173.   <-0.5+Srednica, 0.47, -0.5+Srednica>  
  174.   < 0.5-Srednica, 0.53,  0.5-Srednica>  
  175.     texture { Tekstura_podstawa }
  176.     rotate y*45
  177. }
  178. }
  179.  
  180. #declare Lampa_cala=union{                    
  181.     object{Podstawa scale 0.15} // h=0.07
  182.     object{Kolumna scale <0.8,1,0.8> translate y*0.07} // h=0.7
  183.     object{Lampa scale 0.15 translate y*0.3}
  184.     texture{Tekstura_podstawa}
  185.     scale 1.5
  186. }
  187.  
  188. object{Lampa_cala rotate y*20 translate -x*0.7}
  189. //light_source {<-30, 30, -30> rgb <205,215,255>*1.5/255 spotlight radius 1 falloff 2 tightness 1 point_at y}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement