home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / ply15dat.zip / BOXES.PI < prev    next >
Text File  |  1992-09-19  |  1KB  |  49 lines

  1. // File demonstrating boxes
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. // Set up the camera
  5. viewpoint {
  6.    from <0,8,-28>
  7.    at <0,0,10>
  8.    up <0,1,0>
  9.    angle 45
  10.    hither 1
  11.    resolution 256, 256
  12.    }
  13.  
  14. // Get various surface finishes
  15. background <0, 0, 0>
  16. light <1, 1, 1>, <-10,10, -5>
  17. light <1, 1, 1>, <30, 5, 0>
  18.  
  19. // Set up background color & lights
  20. include "..\colors.inc"
  21.  
  22. // Define a short pyramid made out of progressively smaller boxes
  23. define pyramid
  24. object {
  25.      object { box <-1, 3, -1>, <1, 4, 1> }
  26.    + object { box <-2, 2, -2>, <2, 3, 2> }
  27.    + object { box <-3, 1, -3>, <3, 2, 3> }
  28.    + object { box <-4, 0, -4>, <4, 1, 4> }
  29.    matte_blue
  30.    }
  31.  
  32. // Put together a couple of pyramids, a connecting box, and a couple of spheres
  33. object {
  34.      object { sphere <-6, 7, 0>, 1 shiny_red }
  35.    + object { sphere < 6, 7, 0>, 1 shiny_green }
  36.    + pyramid { translate <-6, 0, 0> }
  37.    + pyramid { translate < 6, 0, 0> }
  38.    + object { box <-6.5, 4, -0.5>, <6.5, 5, 0.5> matte_blue }
  39.    rotate <0, 30, 0>
  40.    }
  41.  
  42. // Create a ground plane
  43. object {
  44.    disc <0, -0.001, 0>, <0, 1, 0>, 0, 1000
  45.    texture { checker matte_white, matte_black }
  46.    scale <10, 10, 10>
  47.    translate <0,-0.01,0>
  48.    }
  49.