home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / OBJECTS / PRIMITIV.POV < prev    next >
Text File  |  1999-10-30  |  3KB  |  158 lines

  1. // Persistence Of Vision raytracer version 3.1 sample file.
  2.  
  3.  
  4. #version 3.1;
  5. global_settings { assumed_gamma 2.2 }
  6.  
  7. #include "stage1.inc"
  8.  
  9. #declare Radius =2.5;
  10. #declare RowSpace=1.1;
  11. #declare ColSpace=1.1;
  12. #declare Dist=-3;
  13. #declare Row3= 2;
  14. #declare Row2=Row3+Radius*RowSpace*2;
  15. #declare Row1=Row2+Radius*RowSpace*2;
  16. #declare Col1= -Radius*ColSpace*3;
  17. #declare Col2= Col1+Radius*ColSpace*2;
  18. #declare Col3= Col2+Radius*ColSpace*2;
  19. #declare Col4= Col3+Radius*ColSpace*2;
  20. #declare Col5= Col4+Radius*ColSpace*2;
  21.  
  22. camera {Camera1 translate <0,Row2,-110>}
  23.  
  24. #declare Fade=
  25. texture {
  26.    pigment {
  27.       gradient <1,1,0>
  28.       color_map {
  29.          [0.0 color Green]
  30.          [0.3 color Green]
  31.          [0.5 color Clear]
  32.          [1.0 color Clear]
  33.       }
  34.       rotate z*45
  35.    }
  36.    finish {phong 1}
  37.    scale 5
  38. }
  39.  
  40. #declare Solid=
  41. texture {
  42.    pigment {Green}
  43.    finish {phong 1}
  44. }
  45.  
  46. bicubic_patch { 
  47.    type 1 flatness 0.01 u_steps 4 v_steps 4,
  48.    <0, -1.5, 2>, <1, -1.5, 0>, <2, -1.5, 0>, <3, -1.5, -2>,
  49.    <0, -0.5, 0>, <1, -0.5, 0>, <2, -0.5, 0>, <3, -0.5,  0>,
  50.    <0,  0.5, 0>, <1,  0.5, 0>, <2,  0.5, 0>, <3,  0.5,  0>,
  51.    <0,  1.5, 2>, <1,  1.5, 0>, <2,  1.5, 0>, <3,  1.5, -2>
  52.    texture {Solid}
  53.    rotate    -45*y
  54.    translate <Col1, Row1, Dist>
  55. }
  56.  
  57. blob {
  58.    threshold 0.6
  59.    component 1.0, 1.0, < 0.75,   0,       0>
  60.    component 1.0, 1.0, <-0.375,  0.64952, 0>
  61.    component 1.0, 1.0, <-0.375, -0.64952, 0>
  62.    texture {Solid}
  63.    translate <Col2, Row1, Dist>
  64. }
  65.  
  66. box {
  67.    <-1, -1, -1>, <1, 1, 1>
  68.    texture {Solid}
  69.    rotate <-25, 15, 0>
  70.    translate <Col3, Row1, Dist>
  71. }
  72.  
  73. cone {
  74.    x,0.5,
  75.    -x,1.0
  76.    rotate  y*30
  77.    texture {Solid}
  78.    translate <Col4, Row1, Dist>
  79. }
  80.  
  81. cylinder {
  82.    x,-x,1.0
  83.    rotate  y*30
  84.    texture {Solid}
  85.    translate <Col1, Row2, Dist>
  86. }
  87.  
  88. cubic { 
  89.    //         x*x                + y*y*y + y*y           + z*z  -1 =0
  90.    <0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0.45, 0, 1, 0, 0, 0, 0, 1, 0, -1>
  91.    sturm
  92.    texture {Fade}
  93.    clipped_by{object{UnitBox scale 2.5}}
  94.    bounded_by{clipped_by}
  95.    translate <Col2, Row2, Dist>
  96. }
  97.  
  98. disc {
  99.    <Col3, Row2, Dist>, //center location
  100.    <-1, 3, -2>,        //normal vector  
  101.    1.5,                //radius         
  102.    0.5                 //hole radius (optional)
  103.    texture {Solid}
  104. }
  105.  
  106.  
  107. height_field { 
  108.    png "plasma3.png" 
  109.    smooth
  110.    texture {Solid}
  111.    translate <-.5, -.5, -.5>
  112.    scale <4,2,4>
  113.    rotate <-35, -30, 0>
  114.    translate <Col4, Row2, Dist>
  115. }  
  116.  
  117. plane { z, 0
  118.    texture {Fade}
  119.    clipped_by{object{UnitBox scale 3}}
  120.    translate <Col1, Row3, Dist>
  121. }  
  122.  
  123. //   x^4 - x^2 + y^2 + z^2 = 0
  124. poly { 4
  125.    < 1,   0,   0,   0,   0,   0,   0,   0,   0, -1,
  126.    0,   0,   0,   0,   0,   0,   0,   0,   0,  0,
  127.    0,   0,   0,   0,   0,   1,   0,   0,   0,  0,
  128.    0,   0,   1,   0,   0>
  129.    sturm
  130.    scale 2
  131.    texture {Solid}
  132.    translate <Col2, Row3, Dist>
  133. }
  134.  
  135. // y - x*x + z*z = 0 
  136. quadric {
  137.    <-1, 0, 1>, <0, 0, 0>, <0, 1, 0>, 0
  138.    texture {Fade}
  139.    clipped_by{object{UnitBox scale 2}}
  140.    translate <Col3, Row3, Dist>
  141. }
  142.  
  143. quartic {
  144.    //xxxx         xxyy    xxzz  -2(rr+RR)xx
  145.    <1, 0, 0, 0, 2, 0, 0, 2, 0, -2.5,
  146.    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  147.  
  148.    //yyyy     yyzz  -2(rr-RR)yy
  149.    1, 0, 0, 2, 0    1.5,     0, 0, 0,  0,  
  150.  
  151.    //zzzz   -2(rr+RR)zz    (rr-RR)(rr-RR)
  152.    1, 0,    -2.5,       0, 0.5625>
  153.    texture {Solid}
  154.    rotate -45*x  
  155.    translate <Col4, Row3, Dist>
  156. }
  157.  
  158.