home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / animate / displace / disp1.pi next >
Text File  |  1994-12-31  |  2KB  |  111 lines

  1. // Generic Polyray input File
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. start_frame 0
  5. end_frame 100
  6.  
  7. define t0 start_frame
  8. define t1 end_frame + 1
  9.  
  10. define increment frame / (t1 - t0)
  11. define ang_inc 360 * increment
  12. define disp 0.15 * (cos(radians(3 * ang_inc)) + 1)
  13. define phas radians(2 * ang_inc)
  14.  
  15. // Set up the camera
  16. viewpoint {
  17.    from <0,5,-9>
  18.    at <0,0.5,0>
  19.    up <0,1,0>
  20.    angle 45
  21.    hither 1
  22.    resolution 160, 160
  23.    }
  24.  
  25. background <0, 0, 0>
  26. light <-10, 10, -10>
  27.  
  28. define reflective_gold
  29. texture {
  30.    surface {
  31.       ambient gold, 0.2
  32.       diffuse gold, 0.7
  33.       specular white, 0.4
  34.       reflection white, 0.3
  35.       microfacet Phong 5
  36.       }
  37.    }
  38.  
  39. // Make a sphere with ridges
  40. object {
  41.    sphere <0, 1, 0>, 2
  42.    reflective_gold
  43.    displace ((v > 0.1 && v < 0.2) ||
  44.              (v > 0.3 && v < 0.4) ||
  45.              (v > 0.5 && v < 0.6) ||
  46.              (v > 0.7 && v < 0.8) ||
  47.              (v > 0.9 && v < 1.0) ||
  48.          (u > 0.0 && u < 0.05) ||
  49.          (u > 0.25 && u < 0.3) ||
  50.          (u > 0.5 && u < 0.55) ||
  51.          (u > 0.75 && u < 0.8)
  52.          ? disp : 0.0)
  53.    uv_steps 64, 32
  54.    rotate <ang_inc, 0, ang_inc>
  55.    rotate <1, 0, 1>, 2 * ang_inc
  56.    shading_flags 7
  57.    }
  58.  
  59. define matte_white
  60. texture {
  61.    surface {
  62.       ambient white, 0.2
  63.       diffuse white, 0.8
  64.       }
  65.    }
  66.  
  67. define matte_black
  68. texture {
  69.    surface {
  70.       ambient dark_slate_gray, 0.1
  71.       diffuse DarkSlateGray, 0.5
  72.       }
  73.    }
  74.  
  75. // The standard sort of marble texture
  76. define green_marble
  77. texture {
  78.    noise surface {
  79.       ambient 0.3
  80.       diffuse 0.8
  81.       specular 0.3
  82.       reflection white, 0.3
  83.       microfacet Reitz 5
  84.       position_fn 1
  85.       lookup_fn 1
  86.       octaves 3
  87.       turbulence 3
  88.       color_map(
  89.          [0.0, 0.8, aquamarine, 0.6 * aquamarine]
  90.          [0.8, 1.0, 0.6 * aquamarine, <0.1, 0.1, 0.1>])
  91.       }
  92.    scale <5, 5, 5>
  93.    }
  94.  
  95. object  {
  96.    sphere <0, 0, 0>, 10
  97.    green_marble
  98.    shading_flags 8
  99.    }
  100.  
  101. object  {
  102.    disc <0, -2, 0>, <0, 1, 0>, 10
  103.    displace 0.5 * sin(phas + x/2) * sin(phas + z/2)
  104.    texture {
  105.       checker matte_white,  matte_black
  106.       translate <0, -0.5, 0>
  107.       scale <3, 10, 3>
  108.       }
  109.    shading_flags 8
  110.    }
  111.