home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Sample file
- // By Dan Farmer
- // Minneapolis, MN
- {
- a pastoral scene with a granite stone fence. This was never really
- "finished", but it works as it is. Plenty of material to play around
- with here. The basic building blocks are here... just use your
- imagination.
- }
- #include "shapes.dat"
- #include "colors.dat"
- #include "textures.dat"
-
- view_point
- location <50.0 40.0 -350.0>
- look_at <-100.0 0.0 0.0>
- direction <0.0 0.0 2.0>
- right < 1.3333 0.0 0.0 >
- end_view_point
-
- { Add light source }
- object
- sphere <0.0 0.0 0.0> 20.0 end_sphere
- translate <100.0 200.0 -630.0>
- texture
- color White
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- color White
- end_object
-
- object
- sphere <0.0 0.0 0.0> 50.0 end_sphere
- translate <50.0 20000.0 50.0>
- texture
- color White
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- color White
- end_object
-
- { Add the sky to the picture }
- object
- sphere <0.0 0.0 0.0> 1000000.0 end_sphere
- texture
- color SkyBlue
- diffuse 0.0
- ambient 0.5
- end_texture
- color SkyBlue
- end_object
-
- { Grassy meadow }
- object
- plane <0.0 1.0 0.0> -2.0 end_plane
- texture
- 0.05 { This value dithers the colors }
- color red 0.2 green 1.0 blue 0.4
- waves 1.0
- frequency 2000.0
- scale <50000.0 50000.0 50000.0>
- ambient 0.1
- diffuse 0.3
- end_texture
- color red 0.2 green 1.0 blue 0.4
- end_object
-
- { Put up a distant wall to prevent a black line in the middle of the
- screen }
- object
- plane <0.0 0.0 1.0> 1000000.0 end_plane
- texture
- color red 0.4 green 0.4 blue 0.8
- ambient 1.0
- diffuse 0.0
- end_texture
- color red 0.4 green 0.4 blue 0.8
- end_object
-
-
- #declare Wall_Segment = object
- intersection Cube end_intersection
- scale <8.0 50.0 100.0>
- texture
- 0.05
- granite
- ambient 0.3
- diffuse 0.7
- brilliance 7.0
- reflection 0.1
- phong 1.0
- phongsize 60
- end_texture
- color White
- end_object
-
- #declare Granite_Ball = object
- sphere <0.0 0.0 10.0> 10.0 end_sphere
- texture
- 0.05
- granite
- ambient 0.3
- diffuse 0.7
- brilliance 7.0
- reflection 0.1
- phong 1.0
- phongsize 60
- end_texture
- color White
- end_object
-
- #declare Column = object
- intersection Cube end_intersection
- scale <12.0 60.0 12.0>
- texture
- 0.05
- granite
- ambient 0.3
- diffuse 0.7
- brilliance 7.0
- reflection 0.1
- phong 1.0
- phongsize 60
- end_texture
- color White
- end_object
-
- { note: Granite column is 12 wide x 12 deep x 60 high
- Granite ball has a radius of 20 }
- #declare Pillar = composite
- object Column translate <0.0 0.0 0.0> end_object
- object Granite_Ball translate <0.0 70.0 0.0> end_object
- end_composite
-
- { Note: Wall segments are 100 units long, Pillars are 12 units "long" }
- composite
- Pillar
- translate <0.0 0.0 -106.0 >
- end_composite
- object
- Wall_Segment
- translate <-2.0 0.0 -6.0 >
- end_object
- composite
- Pillar
- translate <0.0 0.0 0.0 >
- end_composite
- object
- Wall_Segment
- translate <-2.0 0.0 112.0 >
- end_object
- composite
- Pillar
- translate <0.0 0.0 112.0 >
- end_composite
- object
- Wall_Segment
- rotate <0.0 -90.0 0.0>
- translate <76.0 0.0 114.0 >
- end_object
- composite
- Pillar
- translate <176.0 0.0 112.0 >
- end_composite
-