home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / MISC / PVDAT.ZIP / LILY1.DAT < prev    next >
Encoding:
Text File  |  1991-09-07  |  3.7 KB  |  132 lines

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By  Dan Farmer
  4.  
  5. {   lily1.dat  PvRay Script             January 26, '91
  6.     By Dan Farmer
  7.     1001 e. 80th Street, Apt #102
  8.     Minneapolis, mn 55425
  9.  
  10.     Renders a water lily & pad on a pond.
  11.  
  12. }
  13.  
  14. #include "shapes.dat"
  15. #include "colors.dat"
  16. #include "textures.dat"
  17.  
  18. { a speckled yellow texture }
  19. #declare StamenTexture = texture
  20.     bumps 0.3
  21.     granite 0.5
  22.     color_map
  23.         [0.00 0.40 color Yellow color Yellow]
  24.         [0.40 0.50 color Gold color Wheat]
  25.         [0.50 1.001 color Wheat color Yellow]
  26.     end_color_map
  27.     scale <0.5 0.5 0.5>
  28. end_texture
  29.  
  30. #declare Petal = object
  31. { Creates a shape like a wedge of orange peel
  32.  With the main axis is in the z plane, rotated upward on the x axis.
  33.  
  34.                ^
  35.              /   \                ^
  36.            /       \              |
  37.          /           \            y
  38.        /               \          |
  39.       --_             _--         v
  40.          --_      _ --
  41.               --               <- x ->
  42. }
  43.     intersection
  44.         sphere <0.0 0.0 0.0> 30.0 end_sphere
  45.         sphere <0.0 0.0 0.0> 29.9 inverse end_sphere
  46.         plane <-1.0 0.0 0.0> 0.0 rotate <0.0 0.0 -45.0> end_plane
  47.         plane <1.0 0.0 0.0> 0.0 rotate <0.0 0.0 45.0> end_plane
  48.     end_intersection
  49.     texture
  50.        color White
  51.     end_texture
  52.     color White
  53.     rotate <-20.0 0.0 0.0>
  54. end_object
  55.  
  56. { Rotate the petals around the center point to create the flower composite}
  57. #declare PetalLayer1 = composite
  58.   object Petal translate <0.0 0.0 30.0> end_object
  59.   object Petal translate <0.0 0.0 30.0> rotate < 0.0  -45.000000 0.0 > end_object
  60.   object Petal translate <0.0 0.0 30.0> rotate < 0.0  -90.000000 0.0 > end_object
  61.   object Petal translate <0.0 0.0 30.0> rotate < 0.0 -135.000000 0.0 > end_object
  62.   object Petal translate <0.0 0.0 30.0> rotate < 0.0  180.000000 0.0 > end_object
  63.   object Petal translate <0.0 0.0 30.0> rotate < 0.0 -225.000000 0.0 > end_object
  64.   object Petal translate <0.0 0.0 30.0> rotate < 0.0 -270.000000 0.0 > end_object
  65.   object Petal translate <0.0 0.0 30.0> rotate < 0.0 -315.000000 0.0 > end_object
  66.   object sphere <0.0 -6.0 0.0> 15.0 end_sphere
  67.       color Yellow
  68.       texture StamenTexture end_texture
  69.   end_object
  70.   rotate <0.0 -22.5 0.0>     { rotate 1/2 of the 45 degree step }
  71. end_composite
  72.  
  73. {******************************************************************************}
  74. { You }
  75. view_point
  76.    location <20.0  120.0  -170.0>
  77.    direction <0.0 0.0  1.0>
  78.    up  <0.0  1.0  0.0>
  79.    right <1.33333 0.0 0.0>
  80.    look_at <0.0 0.0  -30.0>
  81. end_view_point
  82.  
  83. { The Sun}
  84. object  
  85.    sphere <0.0  0.0  0.0>  2.0 end_sphere
  86.    translate <10.0  200.0  -150.0>
  87.    texture
  88.       colour red 1.0 green 1.0 blue 1.0
  89.       ambient 1.0
  90.       diffuse 0.0
  91.    end_texture
  92.    colour red 1.0 green 1.0 blue 1.0
  93.    light_source
  94. end_object
  95.  
  96. { The pond }
  97. object
  98.     plane <0.0 1.0 0.0> 0.0 end_plane
  99.     color CBlue
  100.     texture
  101.         color CBlue
  102.         waves 0.3
  103.         frequency 100.0
  104.         scale <1000.0 1000.0 1000.0>
  105.     end_texture
  106. end_object
  107.  
  108. { Create a somewhat rounded lily-pad with the split in one end, and a
  109.   "cleavage-line" down the center }
  110. object
  111.     union
  112.         quadric QSphere
  113.             scale <45.0 5.0 25.0>
  114.             translate <45.0 0.0 0.0>
  115.         end_quadric
  116.         quadric QSphere
  117.             scale <45.0 5.0 25.0>
  118.             translate <45.0 0.0 0.0>
  119.             rotate <0.0 -20.0 0.0>
  120.         end_quadric
  121.         translate <0.0 0.0 0.0>
  122.     end_union
  123.     translate <-45.0 0.0 -10.0>
  124.     scale <2.5 2.5 2.5>
  125.     texture
  126.        color CGreen
  127.     end_texture
  128. end_object
  129.  
  130. { Now, put it all together.}
  131. composite PetalLayer1 translate <15.0 45.0 -10.0> end_composite
  132.