home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovst / demos / primitiv.pov < prev    next >
Text File  |  1994-07-24  |  3KB  |  158 lines

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