home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 1995 January
/
pcw-0195.iso
/
polyray
/
dat
/
animate
/
texanim
/
wireanim.pi
< prev
Wrap
Text File
|
1994-12-31
|
1KB
|
56 lines
//
// Texture that simulates the "screen" shader in the Renderman Companion
//
// Polyray input file: Alexander Enzmann
start_frame 0
end_frame 60
define t0 0
define t1 end_frame
define increment (frame - t0) / (t1 - t0)
// Set up the camera
viewpoint {
from <0,5,-7>
at <0,0,0>
up <0,1,0>
angle 45
resolution 256, 256
}
background <0, 0, 0>
light <-10, 20, -20>
include "../../colors.inc"
define density increment
define freq 3
//
// "wire_exper" returns 1 if we are on the visible part of the surface,
// and returns 0 if we are on the see-through part of the surface.
//
define wire_exper (|fmod(freq * P[0], 1)| < density ? 1
: (|fmod(freq * P[1], 1)| < density ? 1 : 0))
define wire_red
texture {
special surface {
ambient wire_exper * red, 0.1
diffuse wire_exper * red, 0.4
specular wire_exper * white, 0.5
microfacet Reitz 10
transmission white, 1 - wire_exper, 1.0
}
}
object {
sphere <0, 0, 0>, 2
wire_red
}
object {
disc <0, -2, 0>, <0, 1, 0>, 10
texture { checker matte_white, matte_black }
}