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

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