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

  1. // Persistence of Vision Raytracer
  2. // Sample file
  3. // By Drew Wells
  4.  
  5. // Title-"Not a Trace of Reality"
  6.  
  7. // -+ Compuserve Hall Of Fame award winner +- 
  8.  
  9. // This one is hard to describe and easy to look at. Have fun with it! 
  10. // - Drew Wells CIS 73767,1244 
  11. // 11/29/90 
  12.  
  13.  
  14.  
  15. // Note - This one is a memory hog for pc's because of the twister 
  16. //        If you can't run it, try editing out some of the twister's 
  17. //        parts.  Requires #include file twister.inc
  18.  
  19. #include "shapes.dat"
  20. #include "colors.dat"
  21. #include "textures.dat"
  22.  
  23. #declare It = 
  24. quadric QSphere scale <4.0 0.3 0.3> end_quadric
  25.  
  26. { Camera/Viewer }
  27. view_point
  28.    direction <0.0 0.0  1.5>
  29.    up  <0.0  1.0  0.0>
  30.    right <-1.333 0.0 0.0>
  31.    translate < -15.0  5.0  120.0>
  32.    look_at <10.0 12.0 55.0>
  33. end_view_point
  34.  
  35. #declare Purple_Clouds = texture
  36.        bozo
  37.        turbulence 0.6
  38.        colour_map
  39.           [0.0 0.5   colour red 0.9 green 0.5  blue 0.6
  40.                      colour red 0.4 green 0.0  blue 0.4]  
  41.           [0.5 0.6   colour red 1.0 green 1.0  blue 1.0 alpha 1.0
  42.                      colour red 1.0 green 1.0  blue 1.0 alpha 1.0 ]
  43.           [0.6 1.001 colour red 1.0 green 1.0  blue 1.0 alpha 1.0
  44.                      colour red 1.0 green 1.0  blue 1.0 alpha 1.0]
  45.        end_colour_map
  46. end_texture
  47.  
  48. #declare Sunset_Sky = texture
  49.        gradient <0.0 1.0 0.0>
  50.        
  51.        colour_map   
  52.           [0.0 0.4   colour red 0.8 green 0.0 blue 0.0
  53.                      colour red 0.4 green 0.0 blue 0.4]
  54.           [0.4 0.6   colour red 0.4 green 0.0 blue 0.4
  55.                      colour red 0.0 green 0.0 blue 0.2]
  56.           [0.6 1.001 colour red 0.0 green 0.0 blue 0.2
  57.                      colour red 0.0 green 0.0 blue 0.0]
  58.        end_colour_map
  59.        scale <700.0 700.0 700.0>
  60. end_texture
  61.  
  62. #declare Twister = object
  63.   union
  64.     #include "twister.inc"
  65.   end_union
  66.   bounded_by
  67.     sphere <0.0 5.0 0.0> 6.0  end_sphere
  68.   end_bound
  69.   texture
  70.     White_Wood
  71.     0.05
  72.     scale <3.0 3.0 3.0>
  73.     ambient 0.1
  74.     diffuse 0.99
  75.   end_texture
  76.   color CBlue
  77. end_object
  78.  
  79. #declare Slice = quadric
  80.    QSphere
  81.    translate <0.0 0.0 3.0>
  82.    scale <0.25 1.00 0.25>
  83. end_quadric
  84.  
  85. #declare Thing = object
  86.   union
  87.     quadric Slice end_quadric
  88.     quadric Slice rotate <0.0 -20.0  0.0> end_quadric
  89.     quadric Slice rotate <0.0 -40.0  0.0> end_quadric
  90.     quadric Slice rotate <0.0 -60.0  0.0> end_quadric
  91.     quadric Slice rotate <0.0 -80.0  0.0> end_quadric
  92.     quadric Slice rotate <0.0 -100.0 0.0> end_quadric
  93.     quadric Slice rotate <0.0 -120.0 0.0> end_quadric
  94.     quadric Slice rotate <0.0 -140.0 0.0> end_quadric
  95.     quadric Slice rotate <0.0 -160.0 0.0> end_quadric
  96.     quadric Slice rotate <0.0  180.0 0.0> end_quadric
  97.     quadric Slice rotate <0.0 -200.0 0.0> end_quadric
  98.     quadric Slice rotate <0.0 -220.0 0.0> end_quadric
  99.     quadric Slice rotate <0.0 -240.0 0.0> end_quadric
  100.     quadric Slice rotate <0.0 -260.0 0.0> end_quadric
  101.     quadric Slice rotate <0.0 -280.0 0.0> end_quadric
  102.     quadric Slice rotate <0.0 -300.0 0.0> end_quadric
  103.     quadric Slice rotate <0.0 -320.0 0.0> end_quadric
  104.     quadric Slice rotate <0.0 -340.0 0.0> end_quadric
  105.   end_union
  106.   bounded_by
  107.       quadric QSphere scale <6.7 6.7 6.7> end_quadric
  108.   end_bound      
  109.   texture
  110.     color red 0.8 green 0.22 blue 0.1
  111.     bumps 0.3
  112.     scale < 0.1 0.1 0.1>
  113.     ambient 0.1
  114.     diffuse 0.9
  115.     phong 0.75
  116.     phongsize 30.0
  117.   end_texture
  118.   color red 0.8 green 0.22 blue 0.1
  119. end_object    
  120.  
  121. #declare Slice2 = sphere <0.0 0.0 0.5> 0.1 end_sphere
  122.  
  123. #declare Thing2 =
  124. object
  125.   union
  126.     sphere Slice2 end_sphere
  127.     sphere Slice2 rotate <0.0 -20.0  0.0> end_sphere
  128.     sphere Slice2 rotate <0.0 -40.0  0.0> end_sphere
  129.     sphere Slice2 rotate <0.0 -60.0  0.0> end_sphere
  130.     sphere Slice2 rotate <0.0 -80.0  0.0> end_sphere
  131.     sphere Slice2 rotate <0.0 -100.0 0.0> end_sphere
  132.     sphere Slice2 rotate <0.0 -120.0 0.0> end_sphere
  133.     sphere Slice2 rotate <0.0 -140.0 0.0> end_sphere
  134.     sphere Slice2 rotate <0.0 -160.0 0.0> end_sphere
  135.     sphere Slice2 rotate <0.0  180.0 0.0> end_sphere
  136.     sphere Slice2 rotate <0.0 -200.0 0.0> end_sphere
  137.     sphere Slice2 rotate <0.0 -220.0 0.0> end_sphere
  138.     sphere Slice2 rotate <0.0 -240.0 0.0> end_sphere
  139.     sphere Slice2 rotate <0.0 -260.0 0.0> end_sphere
  140.     sphere Slice2 rotate <0.0 -280.0 0.0> end_sphere
  141.     sphere Slice2 rotate <0.0 -300.0 0.0> end_sphere
  142.     sphere Slice2 rotate <0.0 -320.0 0.0> end_sphere
  143.     sphere Slice2 rotate <0.0 -340.0 0.0> end_sphere
  144.   end_union
  145.   bounded_by
  146.     sphere <0.0 0.0 0.0> 12 end_sphere
  147.   end_bound
  148.   texture
  149.     color red 0.1 green 0.22 blue 0.8
  150.     ambient 0.1
  151.     diffuse 0.9
  152.     phong 0.75
  153.     phongsize 30.0
  154.   end_texture
  155.   color red 0.1 green 0.22 blue 0.8
  156. end_object    
  157.  
  158.  
  159. {*****************************************}
  160. {*****************************************}
  161.  
  162. object
  163.    Twister
  164.    { scale <4.7 8.0 4.0> }
  165.    rotate <-15.0 30.0 0.0>
  166.    translate <-16.0 7.7 61.5>    
  167. end_object    
  168. object
  169.    Twister
  170.    {scale <1.0 2.0 1.0> }
  171.    rotate <-15.0 0.0 -10.0>
  172.    translate <0.0 1.0 88.0>    
  173. end_object    
  174. object
  175.    Twister
  176.    {scale <4.5 8.0 4.0>}
  177.    rotate <0.0 45.0 0.0>
  178.    translate <13.0 25.0 40.0>    
  179. end_object    
  180.  
  181. object
  182.    Twister
  183.    {scale <4.5 8.0 4.0>}
  184.    rotate <-15.0 0.0 -10.0>
  185.    translate <26.0 14.0 70.0>    
  186. end_object    
  187.  
  188. { Little Things }
  189. object
  190.    Thing 
  191.    scale <1.5 3.0 1.5>
  192.    translate < -11.0 1.55 95.0> 
  193. end_object    
  194. object
  195.    Thing2 
  196.    scale <6.0 6.0 6.0>
  197.    rotate <-10.0 30.0 0.0>
  198.    translate <-11.0 1.55 95.0> 
  199. end_object    
  200.  
  201. object
  202.    Thing 
  203.    scale <1.5 3.5 1.5>
  204.    translate <-10.0 10.55 95.0> 
  205. end_object    
  206. object
  207.    Thing2 
  208.    scale <10.0 10.0 10.0>
  209.    rotate <0.0 0.0 -35.0>
  210.    translate < -10.0 10.55 95.0>    
  211. end_object    
  212.  
  213. object
  214.    Thing 
  215.    scale <1.5 3.5 1.5>
  216.    translate < -4.0 4.0 80.0>    
  217. end_object    
  218. object
  219.    Thing2 
  220.    scale <6.0 6.0 6.0>
  221.    rotate <-30.0 0.0 20.0>
  222.    translate < -4.6 5.55 80.0> 
  223. end_object    
  224.  
  225.  
  226. object
  227.    Thing 
  228.    scale <1.5 3.5 1.5>
  229.    translate < 11.0 1.6 90.0>    
  230. end_object
  231. object
  232.    Thing2    
  233.    scale <8.0 8.0 8.0>
  234.    rotate <0.0 45.0 20.0>
  235.    translate < 10.0 7.0 90.0>    
  236. end_object    
  237.  
  238. {cloud hills}
  239. object
  240.     quadric Paraboloid_Y 
  241.             scale<40.0 10.0 77.0>
  242.     end_quadric 
  243.     rotate <0.0 0.0 180.0>
  244.     translate <0.0 21.0 -28.0>
  245.     texture
  246.       Purple_Clouds
  247.       scale < 5.0 5.0 5.0>
  248.       ambient 0.5
  249.       diffuse 0.9    
  250.     end_texture
  251.     color red 0.5 green 0.6 blue 0.2
  252. end_object
  253.  
  254. {cloud hill to right}
  255. object
  256.     quadric Paraboloid_Y 
  257.             scale<30.0 10.0 40.0>
  258.     end_quadric 
  259.     rotate <0.0 0.0 180.0>
  260.     translate <40.0 14.0 50.0>
  261.     texture
  262.       Purple_Clouds
  263.       scale < 7.0 5.0 5.0>
  264.       ambient 0.5
  265.       diffuse 0.9    
  266.     end_texture
  267.     color red 0.6 green 0.6 blue 0.1
  268. end_object
  269.  
  270. {The Sun}
  271. object
  272.   sphere <0.0 0.0 0.0> 150.0 end_sphere
  273.   translate <150.0 40.0 1200.0>  
  274.   texture
  275.     colour White
  276.     ambient 1.0
  277.     diffuse 0.0
  278.   end_texture
  279.   light_source
  280.   colour White
  281. end_object
  282.  
  283. {sky}
  284. object
  285.    sphere <0.0 0.0 0.0> 2000.0 inverse end_sphere
  286.    texture
  287.      Sunset_Sky
  288.      translate <0.0 200.0 0.0>
  289.      scale <1.2 1.2 1.2>
  290.      ambient 0.6
  291.      diffuse 0.0
  292.    end_texture
  293.    color White
  294. end_object    
  295.