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 >
Wrap
Text File
|
1992-09-19
|
1KB
|
49 lines
// File demonstrating boxes
// Polyray input file: Alexander Enzmann
// Set up the camera
viewpoint {
from <0,8,-28>
at <0,0,10>
up <0,1,0>
angle 45
hither 1
resolution 256, 256
}
// Get various surface finishes
background <0, 0, 0>
light <1, 1, 1>, <-10,10, -5>
light <1, 1, 1>, <30, 5, 0>
// Set up background color & lights
include "..\colors.inc"
// Define a short pyramid made out of progressively smaller boxes
define pyramid
object {
object { box <-1, 3, -1>, <1, 4, 1> }
+ object { box <-2, 2, -2>, <2, 3, 2> }
+ object { box <-3, 1, -3>, <3, 2, 3> }
+ object { box <-4, 0, -4>, <4, 1, 4> }
matte_blue
}
// Put together a couple of pyramids, a connecting box, and a couple of spheres
object {
object { sphere <-6, 7, 0>, 1 shiny_red }
+ object { sphere < 6, 7, 0>, 1 shiny_green }
+ pyramid { translate <-6, 0, 0> }
+ pyramid { translate < 6, 0, 0> }
+ object { box <-6.5, 4, -0.5>, <6.5, 5, 0.5> matte_blue }
rotate <0, 30, 0>
}
// Create a ground plane
object {
disc <0, -0.001, 0>, <0, 1, 0>, 0, 1000
texture { checker matte_white, matte_black }
scale <10, 10, 10>
translate <0,-0.01,0>
}