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

  1. //
  2. // Adapted from the Persistence of Vision Raytracer
  3. // Lapis Lazuli texture by Chad Eby
  4. //
  5.  
  6. define lapis_layer1
  7. color_map([0.0, 0.1, blue, midnight_blue]
  8.           [0.1, 0.2, blue, midnight_blue]
  9.           [0.2, 0.3, blue, midnight_blue]
  10.           [0.3, 0.4, blue, midnight_blue]
  11.           [0.4, 0.5, blue, midnight_blue]
  12.           [0.5, 0.75, midnight_blue, slate_blue]
  13.           [0.75, 0.9, slate_blue, gold]
  14.       [0.9, 0.97, midnight_blue, midnight_blue]
  15.           [0.97, 1.0, slate_blue, gold])
  16.  
  17. define lapis_layer2
  18. color_map([0.0, 0.4, black, 1.0, black, 1.0]
  19.       [0.4, 0.5, black, 1.0, white, 0.6]
  20.       [0.5, 0.7, white, 0.6, white, 0.6]
  21.       [0.7, 0.8, white, 0.6, black, 1.0]
  22.       [0.8, 0.97, black, 1.0, white/2, 0.5]
  23.       [0.97, 0.98, <0.2,0.2,1.0>, 0.5, blue, 0]
  24.       [0.98, 0.99, white, 0.5, white/2, 0.5]
  25.       [0.99, 1.0, white/2, 0.5, blue, 0])
  26.  
  27. static define lapis_layer2_fn sawtooth(x + 2*noise(P, 4))
  28. static define lapis_layer1_fn noise(15*P, 5)
  29. define Lapis_Lazuli
  30. texture {
  31.    layered
  32.       texture { special shiny { color lapis_layer2[lapis_layer2_fn] } },
  33.       texture { special shiny { color lapis_layer1[lapis_layer1_fn] } }
  34.    }
  35.