home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / objects / prism1.pov < prev    next >
Text File  |  1997-12-12  |  5KB  |  269 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Demo showing several prisms ... Dieter Bayer, June 1994
  3. //
  4. // back to front: linear, quadratic, cubic interpolation
  5. // left to right: linear and conic (2x) sweeping
  6.  
  7. #version 3.0
  8. global_settings { assumed_gamma 2.2 }
  9.  
  10. #include "colors.inc"
  11. #include "textures.inc"
  12.  
  13. camera {
  14.   location <80, 80, -160>
  15.   right <4/3, 0, 0>
  16.   up <0, 1, 0>
  17.   sky <0, 1, 0>
  18.   direction <0, 0, 4.5>
  19.   look_at <0, 5, 0>
  20. }
  21.  
  22. light_source { <40, 40, -80> colour Gray40 }
  23.  
  24. light_source { <0, 50, 20> colour Gray40 }
  25.  
  26. light_source { <50, 50, -50> colour Gray40 }
  27.  
  28. light_source { <-50, 50, -50> colour Gray40 }
  29.  
  30. background { color SkyBlue }
  31.  
  32. plane { y, 0
  33.    pigment {
  34.       checker colour Yellow colour Green
  35.       scale 5
  36.    }
  37.    finish {
  38.       ambient 0.2
  39.       diffuse 0.8
  40.    }
  41. }
  42.  
  43. // Prism with linear interpolation and linear sweeping
  44.  
  45. declare Prism1 =
  46. prism {
  47.   linear_spline
  48.   linear_sweep
  49.   0.5,
  50.   1.0,
  51.   11,
  52.  
  53.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  54.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  55.   < 0.2, -1.0>
  56.  
  57.   texture { Brass_Metal }
  58.  
  59.   translate <0, -0.75, 0>
  60.   scale <6, 6, 6>
  61.   rotate <90, 0, 180>
  62.   translate <0, 3, 0>
  63. }
  64.  
  65. // Prism with quadratic interpolation and linear sweeping
  66.  
  67. declare Prism2 =
  68. prism {
  69.   quadratic_spline
  70.   linear_sweep
  71.   0.5,
  72.   1.0,
  73.   12,
  74.  
  75.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  76.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  77.   < 0.2, -1.0>,
  78.   < 0.2,  0.2>
  79.  
  80.   texture { Brass_Metal }
  81.  
  82.   translate <0, -0.75, 0>
  83.   scale <6, 6, 6>
  84.   rotate <90, 0, 180>
  85.   translate <0, 3, 0>
  86. }
  87.  
  88. // Prism with cubic interpolation and linear sweeping
  89.  
  90. declare Prism3 =
  91. prism {
  92.   cubic_spline
  93.   linear_sweep
  94.   0.5,
  95.   1.0,
  96.   13,
  97.  
  98.   <-0.2, -1.0>,
  99.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  100.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  101.   < 0.2, -1.0>,
  102.   < 0.2,  0.2>
  103.  
  104.   texture { Brass_Metal }
  105.  
  106.   translate <0, -0.75, 0>
  107.   scale <6, 6, 6>
  108.   rotate <90, 0, 180>
  109.   translate <0, 3, 0>
  110. }
  111.  
  112. // Prism with linear interpolation and conic sweeping
  113.  
  114. declare Prism4 =
  115. prism {
  116.   linear_spline
  117.   conic_sweep
  118.   0.5,
  119.   1.0,
  120.   11,
  121.  
  122.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  123.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  124.   < 0.2, -1.0>
  125.  
  126.   texture { Brass_Metal }
  127.  
  128.   translate <0, -0.75, 0>
  129.   scale <6, 6, 6>
  130.   rotate <90, 0, 180>
  131.   translate <0, 3, 0>
  132. }
  133.  
  134. // Prism with quadratic interpolation and conic sweeping
  135.  
  136. declare Prism5 =
  137. prism {
  138.   quadratic_spline
  139.   conic_sweep
  140.   0.5,
  141.   1.0,
  142.   12,
  143.  
  144.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  145.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  146.   < 0.2, -1.0>,
  147.   < 0.2,  0.2>
  148.  
  149.   texture { Brass_Metal }
  150.  
  151.   translate <0, -0.75, 0>
  152.   scale <6, 6, 6>
  153.   rotate <90, 0, 180>
  154.   translate <0, 3, 0>
  155. }
  156.  
  157. // Prism with cubic interpolation and conic sweeping
  158.  
  159. declare Prism6 =
  160. prism {
  161.   cubic_spline
  162.   conic_sweep
  163.   0.5,
  164.   1.0,
  165.   13,
  166.  
  167.   <-0.2, -1.0>,
  168.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  169.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  170.   < 0.2, -1.0>,
  171.   < 0.2,  0.2>
  172.  
  173.   texture { Brass_Metal }
  174.  
  175.   translate <0, -0.75, 0>
  176.   scale <6, 6, 6>
  177.   rotate <90, 0, 180>
  178.   translate <0, 3, 0>
  179. }
  180.  
  181. // Prism with linear interpolation and conic sweeping
  182.  
  183. declare Prism7 =
  184. prism {
  185.   linear_spline
  186.   conic_sweep
  187.   0.0,
  188.   1.0,
  189.   11,
  190.  
  191.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  192.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  193.   < 0.2, -1.0>
  194.  
  195.   texture { Brass_Metal }
  196.  
  197.   translate <0, -0.5, 0>
  198.   scale <6, 6, 6>
  199.   rotate <90, 0, 180>
  200.   translate <0, 3, 0>
  201. }
  202.  
  203. // Prism with quadratic interpolation and conic sweeping
  204.  
  205. declare Prism8 =
  206. prism {
  207.   quadratic_spline
  208.   conic_sweep
  209.   0.0,
  210.   1.0,
  211.   12,
  212.  
  213.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  214.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  215.   < 0.2, -1.0>,
  216.   < 0.2,  0.2>
  217.  
  218.   texture { Brass_Metal }
  219.  
  220.   translate <0, -0.5, 0>
  221.   scale <6, 6, 6>
  222.   rotate <90, 0, 180>
  223.   translate <0, 3, 0>
  224. }
  225.  
  226. // Prism with cubic interpolation and conic sweeping
  227.  
  228. declare Prism9 =
  229. prism {
  230.   cubic_spline
  231.   conic_sweep
  232.   0.0,
  233.   1.0,
  234.   13,
  235.  
  236.   <-0.2, -1.0>,
  237.   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>, 
  238.   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
  239.   < 0.2, -1.0>,
  240.   < 0.2,  0.2>
  241.  
  242.   texture { Brass_Metal }
  243.  
  244.   translate <0, -0.5, 0>
  245.   scale <6, 6, 6>
  246.   rotate <90, 0, 180>
  247.   translate <0, 3, 0>
  248. }
  249.  
  250. object { Prism1 translate <-15, 4, 15> }
  251.  
  252. object { Prism2 translate <-15, 4, 0> }
  253.  
  254. object { Prism3 translate <-15, 4, -15> }
  255.  
  256. object { Prism4 translate <0, 4, 15> }
  257.  
  258. object { Prism5 translate <0, 4, 0> }
  259.  
  260. object { Prism6 translate <0, 4, -15> }
  261.  
  262. object { Prism7 translate <15, 4, 15> }
  263.  
  264. object { Prism8 translate <15, 4, 0> }
  265.  
  266. object { Prism9 translate <15, 4, -15> }
  267.  
  268.  
  269.