home *** CD-ROM | disk | FTP | other *** search
- //FIG2-10.PI
-
- include "d:\polyray\include\colors.inc"
- include "d:\polyray\include\texture.inc"
- include "d:\polyray\include\stones.inc"
-
- viewpoint {
- from <0, 5, -20.0>
- at <0.0, 2.5, 5>
- up <0.0, 1.0, 0.0>
- angle 30
- aspect 1.6
- }
-
- // LIGHT_SOURCE
- light <-10, 10, -10>
-
- haze 0.95, 20, black
-
- // Agate texture to use for the colour map changes
- define my_agate
- texture {
- noise surface {
- ambient 0.4
- diffuse 0.6
- specular white, 0.2
- microfacet Cook 4
- position_fn position_objectx
- position_scale 1.1
- lookup_fn lookup_sawtooth
- octaves 3
- turbulence 2
- color_map(
- [0.0, 0.5, Red, Green]
- [0.5, 1.0, Green, Red])
- }
- scale <0.5, 0.5, 0.5>
- }
-
- // PLANE (Polygon)
- object {
- polygon 4, <-100,0,100>, <-100,0,-100>, <100,0,-100>, <100,0,100>
- translate <0, -2.5, 0>
- texture{ checker sapphire_agate, my_agate
- scale <5, 5, 5>}
- }
-
- // SPHERE - normal blue agate
- object {
- sphere <-4.0, 2.5, 6.0>, 3.0
- sapphire_agate
- }
-
- // SPHERE - blue agate using my colour map
- object {
- sphere <4.0, 2.5, 6.0>, 3.0
- my_agate
- }
-
-