Advertisement
Guest User

Untitled

a guest
Nov 4th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include "colors.inc"
  3. #declare s = 0.001;
  4. #declare s2 = 0.05;
  5. #declare a = 0;
  6. #declare b = 1;
  7. #declare c = 4;
  8. #declare d = 5.5;
  9. #declare e = 12;
  10. #declare renderGraf = true;
  11. #declare R1 = function(x) { x+1 }
  12. #declare R2 = function(x) { 0.2 * pow(sin(6*x-6))+2 }
  13. #declare R3 = function(x) { pow(1.31726, x) * 0.615126 }
  14. #declare R4 = function(x) {-0.078322* pow(x, 2) + 0.93986*x }
  15. background { color Blue }
  16. light_source { <3.5, 15, -5> color White}
  17. camera { location <5,5, -12>  look_at <5, 0,  0> }
  18.  
  19. #if (renderGraf)
  20.     #for (xx, a, b, s)
  21.         cylinder{<xx, 0, 0>, <xx + s, 0, 0>, R1(xx) pigment{color Gray}}
  22.     #end
  23.     #for (xx, b, c, s)
  24.         cylinder{<xx, 0, 0>, <xx + s, 0, 0>, R2(xx) pigment{color Gray}}
  25.     #end
  26.     #for (xx, c, d, s)
  27.         cylinder{<xx, 0, 0>, <xx + s, 0, 0>, R3(xx) pigment{color Gray}}
  28.     #end
  29.     #for (xx, d, e, s)
  30.         cylinder{<xx, 0, 0>, <xx + s, 0, 0>, R4(xx) pigment{color Gray}}
  31.     #end
  32. #end //if debug
  33. #for (xx, a, b, s2)
  34.     sphere {        <xx, R1(xx), 0>, 0.1        texture {            pigment { color Yellow }         }    }
  35. #end
  36. #for (xx, b, c, s2)
  37.     sphere {        <xx, R2(xx), 0>, 0.1        texture {            pigment { color Cyan }           }    }
  38. #end
  39. #for (xx, c, d, s2)
  40.     sphere {        <xx, R3(xx), 0>, 0.1        texture {            pigment { color Magenta }        }    }
  41. #end
  42. #for (xx, d, e, s2)
  43.     sphere {        <xx, R4(xx), 0>, 0.1        texture {            pigment { color Magenta }        }    }
  44. #end
  45. //plane { <0,1,0>, 0 pigment { checker pigment{Red}, pigment{Blue} } }
  46. //plane { <0,0,1>, 0 pigment { checker pigment{Red transmit 0.1 }, pigment{Green transmit 0.1 } } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement