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

  1. // Persistence of Vision Raytracer
  2. // Sample Quartic file
  3. // by Alexander Enzmann
  4.  
  5. #include "shapes.dat"
  6. #include "colors.dat"
  7. #include "textures.dat"
  8. #include "shapesq.dat"
  9.  
  10. #declare Metal_Texture = texture    { You need to supply a colour...}
  11.     metallic
  12.     ambient 0.3  diffuse 0.7
  13.     brilliance 6.0
  14.     reflection 0.25
  15.     phong 0.75  phongsize 20
  16. end_texture
  17.  
  18. #declare BrassColor =  colour red 0.71 green 0.65 blue 0.26
  19. #declare BrassTexture = texture
  20.     Metal_Texture colour BrassColor
  21. end_texture
  22.  
  23. #declare GlassTexture = texture
  24.     color White 
  25.     refraction 0.5  reflection 0.5  ior 1.3   
  26. end_texture
  27.  
  28. composite
  29.    { Lemniscate of Gerono }
  30.    { Top half of hourglass }
  31.     object
  32.         quartic Lemniscate end_quartic
  33.         bounded_by
  34.         sphere <0 0 0> 2.01 end_sphere
  35.         end_bound
  36.         color CRed
  37.         texture GlassTexture end_texture
  38.         rotate <0 0 -90>
  39.     end_object
  40.  
  41.    { Lemniscate of Gerono }
  42.    { Lower half of hourglass }
  43.     object
  44.         quartic Lemniscate end_quartic
  45.         bounded_by
  46.         sphere <0 0 0> 2.01 end_sphere
  47.         end_bound
  48.         color CBlue
  49.         texture GlassTexture end_texture
  50.         rotate <0 0 90>
  51.     end_object
  52.  
  53.     {Top plate }
  54.     object
  55.         intersection Y_Disk end_intersection
  56.         scale <0.9 0.15 0.9>
  57.         translate <0.0 1.0 0.0>
  58.         color CGreen
  59.         texture BrassTexture end_texture
  60.     end_object
  61.     {Lower plate }
  62.     object
  63.         intersection Y_Disk end_intersection
  64.         scale <0.9 0.15 0.9>
  65.         translate <0.0 -1.0 0.0>
  66.         color Cyan
  67.         texture BrassTexture end_texture
  68.     end_object
  69.  
  70.     { 3 Brass pillars }
  71.     object
  72.         intersection Y_Disk end_intersection
  73.         scale <0.075 2.0 0.075>
  74.         translate <0.0 -1.0 0.8>
  75.         color Yellow
  76.         texture BrassTexture end_texture
  77.     end_object
  78.     object
  79.         intersection Y_Disk end_intersection
  80.         scale <0.075 2.0 0.075>
  81.         translate <0.0 -1.0 0.8>
  82.         rotate <0.0 120.0 0.0>
  83.         color Yellow
  84.         texture BrassTexture end_texture
  85.     end_object
  86.     object
  87.         intersection Y_Disk end_intersection
  88.         scale <0.075 2.0 0.075>
  89.         translate <0.0 -1.0 0.8>
  90.         rotate <0.0 240.0 0.0>
  91.         color Yellow
  92.         texture BrassTexture end_texture
  93.     end_object
  94.  
  95.     bounded_by
  96.         intersection Y_Disk 
  97.             scale <1.0 2.5 1.0>
  98.         end_intersection
  99.     end_bound
  100.     
  101.     scale <4 4 4>
  102.     rotate <0.0 30.0 0.0>
  103.     translate <0 3 5>
  104. end_composite
  105.  
  106. view_point
  107.     location  <0.0  3.0 -22.0>
  108.     right     <1.0  0.0  0.0>
  109.     up        <0.0  1.0  0.0>
  110.     direction <0.0  0.0  2.0>
  111.     look_at   <0.0  3.0  0.0>
  112. end_view_point
  113.  
  114. object
  115.     sphere <0 0 0 > 1 end_sphere
  116.     translate <200 30 -30>
  117.     texture
  118.         colour White
  119.         ambient 1.0
  120.         diffuse 0.0
  121.     end_texture
  122.     light_source
  123.     colour White
  124. end_object
  125.  
  126. object
  127.     sphere <0 0 0> 1 end_sphere
  128.     translate <-200 30 -300>
  129.     texture
  130.         colour White
  131.         ambient 1.0
  132.         diffuse 0.0
  133.     end_texture
  134.     light_source
  135.     colour White
  136. end_object
  137.  
  138. { Put down floor }
  139. {***object
  140.     plane <0.0 1.0 0.0> -30.0 end_plane
  141.     texture
  142.         Dark_Wood
  143.         scale <10 2 2>
  144.         ambient 0.3
  145.         diffuse 0.7
  146.         reflection 0.5
  147.     end_texture
  148.     rotate <5 0 0>
  149. end_object***}
  150.  
  151.