home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
p
/
ply15dat.zip
/
MAP1.PI
< prev
next >
Wrap
Text File
|
1992-09-19
|
2KB
|
76 lines
// Sample file demonstrating the mapping of an image onto a box
// Polyray input file: Alexander Enzmann
viewpoint {
from <0,3,-10>
at <0,0,5>
up <0,1,0>
angle 45
resolution 160, 160
}
// Get various surface finishes
include "..\colors.inc"
// Set up background color & lights
background <0, 0, 0>
light white, <10, 5, -50>
// Pull in a Targa file
define ball_image image("m22u.tga")
define box_image_texture
texture {
special surface {
color planar_imagemap(ball_image, P, 1)
ambient 0.2
diffuse 0.8
}
}
define ball_image_texture
texture {
special surface {
color spherical_imagemap(ball_image, P)
ambient 0.2
diffuse 0.8
}
}
define can_image_texture
texture {
special surface {
color cylindrical_imagemap(ball_image, P, 1)
ambient 0.2
diffuse 0.8
}
}
define basic_box object { box <-2, 0, -2>, <2, 1, 2> }
basic_box {
box_image_texture { scale <2, 1, 2> }
rotate <-30, 30, 0>
translate <1, 0, -1>
}
object {
sphere <0, 0, 0>, 1
ball_image_texture
rotate <30, 45, 0>
translate <0, 3, 0>
}
object {
cylinder <0, 0, 0>, <0, 3, 0>, 1
can_image_texture { rotate <0, 180, 0> } // { scale <1, 3, 1> }
translate <-3, 0, 1>
}
// 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>
}