home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Sample file
- // By Dan Farmer
- // Minneapolis, MN
-
- // Parabolic arches on the water. Is this the St. Louis McDonalds?
-
-
- #include "colors.dat"
- #include "shapes.dat"
- #include "textures.dat"
-
- view_point
- location <60.0 0.0 -135.0>
- direction <0.0 0.0 2.0>
- up <0.0 1.0 0.0>
- right <1.33333 0.0 0.0>
- look_at <0.0 0.0 0.0>
- end_view_point
-
- // Light
- object
- sphere <0.0 0.0 0.0> 2.0 end_sphere
- translate <200.0 200.0 -150.0>
- texture
- colour Orange // Note the color of light
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- colour Orange
- end_object
-
- // Now draw the sky (From sunset.dat
- object
- sphere <0.0 0.0 0.0> 300.0 end_sphere
- texture
- 0.05 // Add random dithering
- gradient <0.0 1.0 0.0>
- colour_map [0.0 0.8 colour red 0.5 green 0.1 blue 0.7
- colour red 0.1 green 0.1 blue 0.9]
- [0.8 1.0 colour red 0.1 green 0.1 blue 0.9
- colour red 0.1 green 0.1 blue 0.9]
- end_colour_map
- scale <300.0 300.0 300.0>
- ambient 0.7
- diffuse 0.0 { we don't want clouds casting shadows on the sky }
- end_texture
- colour red 0.7 green 0.7 blue 1.0
- end_object
-
- // Put in a few clouds
-
- object
- sphere <0.0 0.0 0.0> 259.0 end_sphere
-
- texture
- bozo
- turbulence 0.7
- colour_map
- [0.0 0.6 colour red 1.0 green 1.0 blue 1.0 alpha 1.0
- colour red 1.0 green 1.0 blue 1.0 alpha 1.0]
- [0.6 0.8 colour red 1.0 green 1.0 blue 1.0 alpha 1.0
- colour red 1.0 green 1.0 blue 1.0]
- [0.8 1.001 colour red 1.0 green 1.0 blue 1.0
- colour red 0.8 green 0.8 blue 0.8]
- end_colour_map
- scale <100.0 20.0 100.0>
- ambient 0.7
- diffuse 0.0
- end_texture
- colour red 0.7 green 0.7 blue 1.0
- end_object
-
-
-
- // Define the ocean surface
- object
- plane <0.0 1.0 0.0> -10.0 end_plane
-
- texture
- colour CBlue
- waves 0.05
- reflection 0.8
- frequency 5000.0
- scale <3000.0 3000.0 3000.0>
- end_texture
- colour CBlue
- end_object
-
- { Put a floor underneath to catch any errant waves from the ripples }
- object
- plane <0.0 1.0 0.0> -11.0 end_plane
- texture
- 0.05
- colour CBlue
- ambient 1.0
- diffuse 0.0
- end_texture
- colour CBlue
- end_object
-
-
- composite
- object
- difference
- quadric Paraboloid_Y { Declared in shapes.dat }
- scale <20.0 20.0 5.0>
- rotate <180.0 0.0 0.0>
- translate <0.0 0.0 0.0>
- end_quadric
- quadric Paraboloid_Y
- scale <15.0 20.0 15.0>
- rotate <180.0 0.0 0.0>
- translate <0.0 -2.0 0.0>
- end_quadric
- end_difference
- texture
- Metal // Declared in textures.dat
- 0.05 // Add random dithering
- color White // Declared in colors.dat
- end_texture
- color White
- end_object
- translate <0.0 30.0 -25.0>
- end_composite
-
- composite
- object
- difference
- quadric Paraboloid_Y
- scale <20.0 20.0 5.0>
- rotate <180.0 0.0 0.0>
- translate <0.0 0.0 0.0>
- end_quadric
- quadric Paraboloid_Y
- scale <15.0 20.0 15.0>
- rotate <180.0 0.0 0.0>
- translate <0.0 -2.0 0.0>
- end_quadric
- end_difference
- texture
- Metal
- 0.05 // Add random dithering
- color White
- end_texture
- color White
- end_object
- translate <0.0 30.0 50.0>
- end_composite
-