home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ray Tracing Box
/
RAY_CD.mdf
/
raytrace
/
_pov_dat
/
hftutr
/
hftutor1.pov
< prev
Wrap
Text File
|
1993-04-15
|
2KB
|
52 lines
// Persistence Of Vision raytracer version 1.0 sample file.
// Basic heightfield tutorial
// Requires HFTUTOR.GIF.
// HF Image is a circular gradient with values ranging from 0 to 255
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
// This camera view will show the heightfield from halfway up the side.
// It's a very boring view, but best demonstrates the positioning of
// the object.
camera {
location <0 0.5 -2.25>
direction <0.0 0.0 1.0>
up <0.0 1.0 0.0>
right <1.33333 0.0 0.0>
look_at <0 0 0>
}
// Light source
object { light_source { <2 12 -10> color White } }
// Sky, ambient set to 1, diffuse 0 to eliminate shadows
object { sphere { <0 0 0> 10000 texture { color Blue ambient 1 diffuse 0 }}}
// Axis grid, each checker is 1 unit measure
object {
union {
intersection { Disk_X scale <2.0 0.05 0.001> }
intersection { Disk_Y scale <0.05 2.0 0.001> }
intersection { Disk_X scale <2.0 0.05 0.001> translate <0 1 0> }
intersection { Disk_Y scale <0.05 2.0 0.001> translate <1 0 0> }
}
texture { Shiny checker color Red color Yellow }
}
// The heightfield.
// Image resolution is irrelevant to heightfield scale!
object {
height_field { // 1x1x1, lower left front at 0,0,0
gif "HFTUTOR.GIF"
}
// For step #2, uncomment the line below and re-render
// translate <-0.5 0 -0.5> // Center the heightfield
// scale <1 0.1 1> // Adjust height as desired
texture { Shiny color White }
}