home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / misc / xander.pi < prev   
Text File  |  1994-12-31  |  3KB  |  133 lines

  1. // Polyray sample data file written by Alexander Enzmann
  2.  
  3. /*
  4. start_frame 0
  5. end_frame 29
  6. total_frames 30
  7. */
  8.  
  9. viewpoint {
  10.    from      <0, 4, -25>
  11.    up        <0, 1, 0>
  12.    at        <0, 0, 0>
  13.    angle 30
  14.    hither 1
  15.    resolution 512, 256
  16.    aspect 2
  17.    }
  18.  
  19. background midnight_blue
  20. light white, <-10, 50, -20>
  21. light white, < 10, 50, -20>
  22. include "..\colors.inc"
  23.  
  24. define test_map
  25.    color_map(
  26.       [0,   0.1, red,     orange]
  27.       [0.1, 0.3, orange,  blue]
  28.       [0.3, 0.5, blue,    skyblue]
  29.       [0.5, 0.7, skyblue, orange]
  30.       [0.7, 0.9, orange,  magenta]
  31.       [0.9, 1.0, magenta, red],
  32.       <1, 1, 1>)
  33.  
  34. // Simple color map texture
  35. define noise_texture0
  36. texture {
  37.    special surface {
  38.       color test_map[noise(P)]
  39.       ambient 0.2
  40.       diffuse 0.8
  41.       specular white, 0.5
  42.       microfacet Reitz 10
  43.       }
  44.    scale <0.6, 0.6, 0.6>
  45.    }
  46.  
  47. define marble_turb 2
  48. define marble_fn  sawtooth(P[0] + marble_turb * noise(P,4))
  49.  
  50. define white_marble_map
  51.    color_map(
  52.       [0.0, 0.8, <0.9, 0.9, 0.9>, <0.5, 0.5, 0.5>]
  53.       [0.8, 1.0, <0.5, 0.5, 0.5>, <0.2, 0.2, 0.2>])
  54.  
  55. define white_marble_texture
  56. texture {
  57.    special surface {
  58.       color white_marble_map[marble_fn]
  59.       ambient 0.2
  60.       diffuse 0.8
  61.       specular white, 0.5
  62.       microfacet Reitz 10
  63.       }
  64.    }
  65.  
  66. define box0 object { box <0, 0, 0>, <1, 5, 1> }
  67.  
  68. define char_a
  69. object {
  70.      box0 { shear  0, 0, 0.4, 0, 0, 0 }
  71.    + box0 { shear  0, 0,-0.4, 0, 0, 0 translate <4, 0, 0> }
  72.    + object { box <1.5, 1.5, 0>, <3.5, 2, 1> }
  73.    }
  74.  
  75. define char_e
  76. object {
  77.      box0
  78.    + object { box <0, 4.5, 0>, <4, 5, 1> }
  79.    + object { box <0, 2, 0>, <2.5, 2.5, 1> }
  80.    + object { box <0, 0, 0>, <4, 0.5, 1> }
  81.    }
  82.  
  83. define char_d
  84. object {
  85.      box0
  86.    + (  (  object { cylinder <1, 2.5, -0.05>, <1, 2.5, 1.05>, 2.5
  87.             u_steps 32 scale <1.2, 1, 1> }
  88.          * object { box <1, 0, 0>, <4.5, 5, 1> })
  89.        - object { cylinder <1.5, 2.5, -0.1>, <1.5, 2.5, 1.1>, 1 u_steps 32 } )
  90.    }
  91.  
  92. define char_n
  93. object {
  94.      box0
  95.    + box0 { shear  0, 0, -0.6, 0, 0, 0 translate <3, 0, 0> }
  96.    + box0 { translate <3, 0, 0> }
  97.    }
  98.  
  99. define char_r
  100. object {
  101.      box0
  102.    + (  (  object { cylinder <1.5, 3.5, -0.5>, <1.5, 3.5, 1.05>, 1.5
  103.             u_steps 32 }
  104.            * object { box <0, 2, 0>, <4, 5, 1> })
  105.          - object { cylinder <1.5, 3.5, -0.1>, <1.5, 3.5, 1.1>, 0.75
  106.             u_steps 32 })
  107.    + box0 { scale <1, 0.5, 1> shear  0, 0, -0.6, 0, 0, 0 translate <3, 0, 0> }
  108.    }
  109.  
  110. define char_x
  111. object {
  112.      box0 { shear  0, 0, 0.8, 0, 0, 0 }
  113.    + box0 { shear  0, 0,-0.8, 0, 0, 0 translate <4, 0, 0> }
  114.    }
  115.  
  116. object {
  117.      char_x
  118.    + char_a { translate <5, 0, 0> }
  119.    + char_n { translate <10, 0, 0> }
  120.    + char_d { translate <15, 0, 0> }
  121.    + char_e { translate <20, 0, 0> }
  122.    + char_r { translate <25, 0, 0> }
  123.    + object { disc <15, 0, 0>, <0, 1, 0>, 20
  124.           u_steps 32
  125.           v_steps 4
  126.           texture { hexagon noise_texture0, matte_yellow, matte_orange
  127.                 scale <5, 5, 5>} }
  128.    translate <-15, -5, 0>
  129.    scale <0.5, 0.5, 0.5>
  130.    rotate <0, 12 * frame, 0>
  131.    white_marble_texture
  132.    }
  133.