home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / misc / recspot.inc < prev    next >
Text File  |  1994-12-31  |  4KB  |  109 lines

  1. // Lighting for the recursive room
  2.  
  3. define from0 < 4, 0.5, 7.3>  define at0 < 2, 4.5, 10>
  4. define from1 <-4, 0.5, 7.3>  define at1 <-2, 4.5, 10>
  5. define from2 < 5.3, 0.5, 1>  define at2 <8, 4.5, 3>
  6. define from3 < 5.3, 0.5, 9>  define at3 <8, 4.5, 6>
  7. define from4 <-5.3, 0.5, 1>  define at4 <-8, 4.5, 3>
  8. define from5 <-5.3, 0.5, 9>  define at5 <-8, 4.5, 6>
  9.  
  10. define from6 < 7.5, 9.5, 9>   define at6 <-1, 0,-1>
  11. define from7 <-7.5, 9.5, 9>   define at7 < 1, 0,-1>
  12. define from8 < 7.5, 9.5, 0>   define at8 <-1, 0, 1>
  13. define from9 <-7.5, 9.5, 0>   define at9 < 1, 0, 1>
  14.  
  15. define dif0 (at0 - from0)/|at0 - from0|
  16. define dif1 (at1 - from1)/|at1 - from1|
  17. define dif2 (at2 - from2)/|at2 - from2|
  18. define dif3 (at3 - from3)/|at3 - from3|
  19. define dif4 (at4 - from4)/|at4 - from4|
  20. define dif5 (at5 - from5)/|at5 - from5|
  21. define dif6 (at6 - from6)/|at6 - from6|
  22. define dif7 (at7 - from7)/|at7 - from7|
  23. define dif8 (at8 - from8)/|at8 - from8|
  24. define dif9 (at9 - from9)/|at9 - from9|
  25.  
  26. define spotlight_texture
  27. texture {
  28.    special surface {
  29.       normal N + dnoise(3*W)
  30.       ambient grey, 0.2
  31.       diffuse grey, 0.3
  32.       specular white, 0.6
  33.       microfacet Cook 10
  34.       }
  35.    scale <0.05, 0.05, 0.05>
  36.    }
  37.  
  38. define bright_white texture { surface { color white ambient 1 diffuse 0 } }
  39.  
  40. // Spots pointed towards the back wall
  41. define s0 0.5
  42. define s1 0.3
  43. define s2 0.6
  44. define l0 1.0
  45. define l1 0.3
  46. spot_light white, from0, at0, 1, 15, 25
  47. spot_light white, from1, at1, 1, 15, 25
  48. object {
  49.    (object { sphere from0, s0 } & object { disc from0+l1*dif0, dif0, s0 })
  50.    + object { cone from0, s1, from0 + l0 * dif0, s2 }
  51.    + object { disc from0+l0*dif0, dif0, s0 bright_white shading_flags 32 }
  52.    spotlight_texture
  53.    }
  54. object {
  55.    (object { sphere from1, s0 } & object { disc from1+l1*dif1, dif1, s0 })
  56.    + object { cone from1, s1, from1 + l0 * dif1, s2 }
  57.    + object { disc from1+l0*dif1, dif1, s0 bright_white shading_flags 32 }
  58.    spotlight_texture
  59.    }
  60.  
  61. // Spots pointed towards the right wall
  62. spot_light white, from2, at2, 1, 15, 25
  63. spot_light white, from3, at3, 1, 15, 25
  64. object {
  65.    (object { sphere from2, s0 } & object { disc from2+l1*dif2, dif2, s0 })
  66.    + object { cone from2, s1, from2 + l0 * dif2, s2 }
  67.    + object { disc from2+l0*dif2, dif2, s0 bright_white shading_flags 32 }
  68.    spotlight_texture
  69.    }
  70. object {
  71.    (object { sphere from3, s0 } & object { disc from3+l1*dif3, dif3, s0 })
  72.    + object { cone from3, s1, from3 + l0 * dif3, s2 }
  73.    + object { disc from3+l0*dif3, dif3, s0 bright_white shading_flags 32 }
  74.    spotlight_texture
  75.    }
  76.  
  77. // Spots pointed towards the left wall
  78. spot_light white, from4, at4, 1, 15, 25
  79. spot_light white, from5, at5, 1, 15, 25
  80. object {
  81.    (object { sphere from4, s0 } & object { disc from4+l1*dif4, dif4, s0 })
  82.    + object { cone from4, s1, from4 + l0 * dif4, s2 }
  83.    + object { disc from4+l0*dif4, dif4, s0 bright_white shading_flags 32 }
  84.    spotlight_texture
  85.    }
  86. object {
  87.    (object { sphere from5, s0 } & object { disc from5+l1*dif5, dif5, s0 })
  88.    + object { cone from5, s1, from5 + l0 * dif5, s2 }
  89.    + object { disc from5+l0*dif5, dif5, s0 bright_white shading_flags 32 }
  90.    spotlight_texture
  91.    }
  92.  
  93. spot_light white, from6, at6, 1, 5, 7
  94. spot_light white, from7, at7, 1, 5, 7
  95. spot_light white, from8, at8, 1, 5, 7
  96. spot_light white, from9, at9, 1, 5, 7
  97. object {
  98.    (object { sphere from6, s0 } & object { disc from6+l1*dif6, dif6, s0 })
  99.    + object { cone from6, s1, from6 + l0 * dif6, s0 }
  100.    + object { disc from6+l0*dif6, dif6, s0 bright_white shading_flags 32 }
  101.    spotlight_texture
  102.    }
  103. object {
  104.    (object { sphere from7, s0 } & object { disc from7+l1*dif7, dif7, s0 })
  105.    + object { cone from7, s1, from7 + l0 * dif7, s0 }
  106.    + object { disc from7+l0*dif7, dif7, s0 bright_white shading_flags 32 }
  107.    spotlight_texture
  108.    }
  109.