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

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Dieter Bayer
  3. // This scene shows emitting halos with a linear density function
  4. // and spherical mapping with different color maps.
  5.  
  6. #version 3.0
  7. global_settings { assumed_gamma 2.2 }
  8.  
  9. #include "colors.inc"
  10.  
  11. camera {
  12.   orthographic
  13.   location <0, 0, -10>
  14.   right 16 * 4/3 * x
  15.   up 16 * y
  16.   look_at <0, 0, 0>
  17. }
  18.  
  19. light_source { <50, 50, -100> color White }
  20.  
  21. plane { <0, 0, 1>, 5
  22.   pigment { checker color Green color Blue }
  23.   finish { ambient 0.1 diffuse 0.4 }
  24.   hollow
  25. }
  26.  
  27. #declare Row1 =  +6
  28. #declare Row2 =  +2
  29. #declare Row3 =  -2
  30. #declare Row4 =  -6
  31. #declare Col1 =  -6
  32. #declare Col2 =  -2
  33. #declare Col3 =  +2
  34. #declare Col4 =  +6
  35.  
  36. #declare Turbulence = 0
  37. #declare Samples = 5
  38.  
  39. //
  40. // Declare container object.
  41. //
  42.  
  43. #declare Thing = sphere { 0, 1 hollow scale 1.5 }
  44.  
  45. //
  46. // Declare basic texture.
  47. //
  48.  
  49. #declare Texture = texture {
  50.   pigment { color Clear }
  51.   finish { ambient 0 diffuse 0 }
  52. }
  53.  
  54. //
  55. // Declare basic halo.
  56. //
  57.  
  58. #declare Halo = halo {
  59.   linear
  60.   emitting
  61.   spherical_mapping
  62.   max_value 1
  63.   color_map
  64.   {
  65.     [0.0 color rgbt<1, 0, 0, 1>]
  66.     [1.0 color rgbt<1, 1, 0, 0>]
  67.   }
  68.   turbulence Turbulence
  69.   samples Samples
  70.   aa_level 3
  71.   aa_threshold 0.3
  72.   scale 1.5
  73. }
  74.  
  75. //
  76. // Declare four halos with increasing filter value, i.e. 
  77. // increasing opacity for the high density color.
  78. //
  79.  
  80. #declare Texture01 =
  81. texture {
  82.   Texture
  83.   halo {
  84.     Halo
  85.     color_map
  86.     {
  87.       [0.0 color rgbf<1, 0, 0, 0>]
  88.       [1.0 color rgbf<1, 1, 0, 0.25>]
  89.     }
  90.   }
  91. }
  92.  
  93. #declare Texture02 =
  94. texture {
  95.   Texture
  96.   halo {
  97.     Halo
  98.     color_map
  99.     {
  100.       [0.0 color rgbf<1, 0, 0, 0>]
  101.       [1.0 color rgbf<1, 1, 0, 0.5>]
  102.     }
  103.   }
  104. }
  105.  
  106. #declare Texture03 =
  107. texture {
  108.   Texture
  109.   halo {
  110.     Halo
  111.     color_map
  112.     {
  113.       [0.0 color rgbf<1, 0, 0, 0>]
  114.       [1.0 color rgbf<1, 1, 0, 0.75> ]
  115.     }
  116.   }
  117. }
  118.  
  119. #declare Texture04 =
  120. texture {
  121.   Texture
  122.   halo {
  123.     Halo
  124.     color_map
  125.     {
  126.       [0.0 color rgbf<1, 0, 0, 0>]
  127.       [1.0 color rgbf<1, 1, 0, 1>]
  128.     }
  129.   }
  130. }
  131.  
  132. //
  133. // Declare four halos with increasing filter value, i.e.
  134. // increasing opacity for the low density color.
  135. //
  136.  
  137. #declare Texture05 =
  138. texture {
  139.   Texture
  140.   halo {
  141.     Halo
  142.     color_map
  143.     {
  144.       [0.0 color rgbf<1, 0, 0, 0.25>]
  145.       [1.0 color rgbf<1, 1, 0, 1>]
  146.     }
  147.   }
  148. }
  149.  
  150. //
  151. // Declare halo
  152. //
  153.  
  154. #declare Texture06 =
  155. texture {
  156.   Texture
  157.   halo {
  158.     Halo
  159.     color_map
  160.     {
  161.       [0.0 color rgbf<1, 0, 0, 0.5>]
  162.       [1.0 color rgbf<1, 1, 0, 1>]
  163.     }
  164.   }
  165. }
  166.  
  167. #declare Texture07 =
  168. texture {
  169.   Texture
  170.   halo {
  171.     Halo
  172.     color_map
  173.     {
  174.       [0.0 color rgbf<1, 0, 0, 0.75>]
  175.       [1.0 color rgbf<1, 1, 0, 1>]
  176.     }
  177.   }
  178. }
  179.  
  180. #declare Texture08 =
  181. texture {
  182.   Texture
  183.   halo {
  184.     Halo
  185.     color_map
  186.     {
  187.       [0.0 color rgbf<1, 0, 0, 1>]
  188.       [1.0 color rgbf<1, 1, 0, 1>]
  189.     }
  190.   }
  191. }
  192.  
  193. //
  194. // Declare four halos with increasing max_value.
  195. //
  196.  
  197. #declare Texture09 =
  198. texture {
  199.   Texture
  200.   halo {
  201.     Halo
  202.     max_value 1
  203.     color_map
  204.     {
  205.       [0.0 color rgbf<1, 0, 0, 0>]
  206.       [0.5 color rgbf<1, 1, 0, 1>]
  207.       [1.0 color rgbf<1, 0, 0, 0>]
  208.     }
  209.   }
  210. }
  211.  
  212. #declare Texture10 = 
  213. texture {
  214.   Texture
  215.   halo {
  216.     Halo
  217.     max_value 2
  218.     color_map
  219.     {
  220.       [0.0 color rgbf<1, 0, 0, 0>]
  221.       [0.5 color rgbf<1, 1, 0, 1>]
  222.       [1.0 color rgbf<1, 0, 0, 0>]
  223.     }
  224.   }
  225. }
  226.  
  227. #declare Texture11 = 
  228. texture {
  229.   Texture
  230.   halo {
  231.     Halo
  232.     max_value 3
  233.     color_map
  234.     {
  235.       [0.0 color rgbf<1, 0, 0, 0>]
  236.       [0.5 color rgbf<1, 1, 0, 1>]
  237.       [1.0 color rgbf<1, 0, 0, 0>]
  238.     }
  239.   }
  240. }
  241.  
  242. #declare Texture12 = 
  243. texture {
  244.   Texture
  245.   halo {
  246.     Halo
  247.     max_value 4
  248.     color_map
  249.     {
  250.       [0.0 color rgbf<1, 0, 0, 0>]
  251.       [0.5 color rgbf<1, 1, 0, 1>]
  252.       [1.0 color rgbf<1, 0, 0, 0>]
  253.     }
  254.   }
  255. }
  256.  
  257.  
  258. //
  259. // Declare four halos with increasing frequencies and peridioc color map.
  260. //
  261.  
  262. #declare Texture13 =
  263. texture {
  264.   Texture
  265.   halo {
  266.     Halo
  267.     frequency 1
  268.     color_map
  269.     {
  270.       [0.0 color rgbf<1, 0, 0, 0>]
  271.       [0.5 color rgbf<1, 1, 0, 1>]
  272.       [1.0 color rgbf<1, 0, 0, 0>]
  273.     }
  274.   }
  275. }
  276.  
  277. #declare Texture14 =
  278. texture {
  279.   Texture
  280.   halo {
  281.     Halo
  282.     frequency 2
  283.     color_map
  284.     {
  285.       [0.0 color rgbf<1, 0, 0, 0>]
  286.       [0.5 color rgbf<1, 1, 0, 1>]
  287.       [1.0 color rgbf<1, 0, 0, 0>]
  288.     }
  289.   }
  290. }
  291.  
  292. #declare Texture15 =
  293. texture {
  294.   Texture
  295.   halo {
  296.     Halo
  297.     frequency 3
  298.     color_map
  299.     {
  300.       [0.0 color rgbf<1, 0, 0, 0>]
  301.       [0.5 color rgbf<1, 1, 0, 1>]
  302.       [1.0 color rgbf<1, 0, 0, 0>]
  303.     }
  304.   }
  305. }
  306.  
  307. #declare Texture16 = 
  308. texture {
  309.   Texture
  310.   halo {
  311.     Halo
  312.     frequency 4
  313.     color_map
  314.     {
  315.       [0.0 color rgbf<1, 0, 0, 0>]
  316.       [0.5 color rgbf<1, 1, 0, 1>]
  317.       [1.0 color rgbf<1, 0, 0, 0>]
  318.     }
  319.   }
  320. }
  321.  
  322. object { Thing texture { Texture01 } translate <Col1, Row1, 0> }
  323.  
  324. object { Thing texture { Texture02 } translate <Col2, Row1, 0> }
  325.  
  326. object { Thing texture { Texture03 } translate <Col3, Row1, 0> }
  327.  
  328. object { Thing texture { Texture04 } translate <Col4, Row1, 0> }
  329.  
  330. object { Thing texture { Texture05 } translate <Col1, Row2, 0> }
  331.  
  332. object { Thing texture { Texture06 } translate <Col2, Row2, 0> }
  333.  
  334. object { Thing texture { Texture07 } translate <Col3, Row2, 0> }
  335.  
  336. object { Thing texture { Texture08 } translate <Col4, Row2, 0> }
  337.  
  338. object { Thing texture { Texture09 } translate <Col1, Row3, 0> }
  339.  
  340. object { Thing texture { Texture10 } translate <Col2, Row3, 0> }
  341.  
  342. object { Thing texture { Texture11 } translate <Col3, Row3, 0> }
  343.  
  344. object { Thing texture { Texture12 } translate <Col4, Row3, 0> }
  345.  
  346. object { Thing texture { Texture13 } translate <Col1, Row4, 0> }
  347.  
  348. object { Thing texture { Texture14 } translate <Col2, Row4, 0> }
  349.  
  350. object { Thing texture { Texture15 } translate <Col3, Row4, 0> }
  351.  
  352. object { Thing texture { Texture16 } translate <Col4, Row4, 0> }
  353.  
  354.