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

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