home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 May / PCWorld_2000-05_cd.bin / Software / TemaCD / povray / povwin3.exe / %MAINDIR% / scenes / lights / soft.pov < prev    next >
Encoding:
Text File  |  2000-04-06  |  2.6 KB  |  130 lines

  1. // Persistence Of Vision raytracer version 3.1 sample file.
  2. // Demo of extended light sources by Steve Anger
  3.  
  4. global_settings { assumed_gamma 1.0 }
  5.  
  6. #include "colors.inc"
  7. #include "textures.inc"
  8. #include "shapes.inc"
  9.  
  10.  
  11. // A rather boring texture but it renders quick
  12. #declare Text_Texture = texture {
  13.    pigment { Red }
  14.    finish {
  15.       phong 2.0
  16.       phong_size 80
  17.       ambient 0.1
  18.       diffuse 1.5
  19.    }
  20. }
  21.  
  22. #declare Letter_S = union {
  23.     difference {
  24.        torus { 4.0, 1.5 rotate 90*x }
  25.        box { <0, -5.5, -1.5>, <5.5, 0, 1.5> }
  26.  
  27.        translate 4*y
  28.     }
  29.  
  30.     difference {
  31.        torus { 4.0, 1.5 rotate 90*x }
  32.        box { <-5.5, 0, -1.5>, <0, 5.5, 1.5> }
  33.  
  34.        translate -4*y
  35.     }
  36.  
  37.     sphere { <4, 4, 0>, 1.5 }
  38.     sphere { <-4, -4, 0>, 1.5 }
  39.  
  40. }
  41.  
  42. #declare Letter_O = union {
  43.     torus { 4.0, 1.5
  44.         rotate 90*x
  45.  
  46.         clipped_by { box { <-5.5, 0, -1.5> <5.5, 5.5, 1.5> } }
  47.         translate 4*y
  48.     }
  49.  
  50.     torus { 4.0, 1.5
  51.         rotate 90*x
  52.  
  53.         clipped_by { box { <-5.5, -5.5, -1.5> <5.5, 0, 1.5> } }
  54.         translate -4*y
  55.     }
  56.  
  57.     cylinder { <-4, -4, 0>, <-4, +4, 0>, 1.5 }
  58.     cylinder { <+4, -4, 0>, <+4, +4, 0>, 1.5 }
  59.  
  60. }
  61.  
  62. #declare Letter_F = union {
  63.     cylinder { <-4, -8, 0>, <-4, 8, 0>, 1.5 }
  64.     cylinder { <-4, 0, 0>, <1.5, 0, 0>, 1.5 }
  65.     cylinder { <-4, 8, 0>, <4, 8, 0>, 1.5 }
  66.  
  67.     sphere { <-4, -8, 0>, 1.5 }
  68.     sphere { <-4, 8, 0>, 1.5 }
  69.     sphere { <4, 8, 0>, 1.5 }
  70.     sphere { <1.5, 0, 0>, 1.5 }
  71.  
  72. }
  73.  
  74. #declare Letter_T = union {
  75.     cylinder { <0, -8, 0>, <0, 8, 0>, 1.5 }
  76.     cylinder { <-4, 8, 0>, <4, 8, 0>, 1.5 }
  77.  
  78.     sphere { <-4, 8, 0>, 1.5 }
  79.     sphere { <+4, 8, 0>, 1.5 }
  80.     sphere { <0, -8, 0>, 1.5 }
  81.  
  82. }
  83.  
  84.  
  85. // Put the letters together
  86. union {
  87.     object { Letter_S  translate -20*x }
  88.     object { Letter_O  translate  -7*x }
  89.     object { Letter_F  translate   7*x }
  90.     object { Letter_T  translate  20*x }
  91.  
  92.     texture { Text_Texture }
  93.  
  94.     translate 9.5*y
  95. }
  96.  
  97. // Floor
  98. plane { y, 0
  99.     pigment { Tan }
  100.     finish {
  101.         ambient 0.0
  102.         diffuse 0.8
  103.     }
  104. }
  105.  
  106. // Something to light the front of the text
  107. light_source { <0, 30, -90> color Gray30 }
  108.  
  109. // An extended area spotlight to backlight the letters
  110. light_source {
  111.    <0, 50, 100> color White
  112.  
  113.    // The spotlight parameters
  114.    spotlight
  115.    point_at <0, 0, -5>
  116.    radius 6
  117.    falloff 22
  118.  
  119.    // The extended area light paramaters
  120.    area_light <6, 0, 0>, <0, 6, 0>, 9, 9
  121.    adaptive 0
  122.    jitter
  123. }
  124.  
  125. camera {
  126.     direction <0, 0, 1.5>
  127.     location <0, 30, -90>
  128.     look_at <0, 0, -2>
  129. }
  130.