home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- // Sample file
- // By Dan Farmer
- // Minneapolis, mn
-
- // Demonstrates one use of the powerful alpha parameter for colors.
-
- #include "shapes.dat"
- #include "colors.dat"
- #include "textures.dat"
-
- view_point
- location <-1.5 30.0 -150.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 25.0 35.0>
- end_view_point
-
- object { Basic Light source }
- sphere <0.0 0.0 0.0> 5.0 end_sphere
- translate <100.0 100.0 -200.0>
- texture
- colour White
- ambient 1.0
- diffuse 0.0
- end_texture
- light_source
- colour White
- end_object
-
- { Now draw the sky }
- object
- sphere <0.0 0.0 0.0> 200000.0 end_sphere
- texture
- 0.05
- marble
- turbulence 1.0
- colour_map
- [0.0 0.5 colour red 0.5 green 0.6 blue 1.0
- colour red 0.6 green 0.5 blue 1.0]
- [0.5 0.6 colour red 0.5 green 0.6 blue 1.0
- colour red 1.0 green 1.0 blue 1.0]
- [0.6 1.001 colour red 1.0 green 1.0 blue 1.0
- colour red 0.5 green 0.5 blue 0.5]
- end_colour_map
- scale <10.0 10.0 10.0>
- ambient 1.0
- diffuse 0.0
- end_texture
- colour SkyBlue
- end_object
-
- {*****************************************************************************}
- {
- This composite makes a checkerboard with alternating marblized and solid
- checks.
- Ideas:
- 1) Sub-plane could also be a smaller-scaled checker pattern.
- 2) Also, what if sub-plane was a solid color plane, but farther below
- the upper plane, say y= -2.0 ?
- So many ideas, so little time. Anybody got a 486 to spare?
- }
- composite
-
- { Marbled checkerboard pattern using alpha 1.0 }
- object
- plane <0.0 1.0 0.0 > 0.0 end_plane { Checkerboard surface plane }
- texture
- checker colour Thistle colour White alpha 1.0
- scale <10.0 10.0 10.0>
- end_texture
- color White alpha 1.0
- end_object
-
- { Marble sub-plane. }
- object
- plane <0.0 1.0 0.0 > -0.1 end_plane
- texture
- White_Marble
- scale <10.0 10.0 10.0>
- end_texture
- color White
- end_object
- end_composite
-
-
- {*****************************************************************************}
- {
- This next composite uses the alpha parameter to make a sphere with
- a "cutout" checker pattern. a smaller, reflective sphere inside
- is just there to add interest.
-
- Again, don't limit this to checker patterns. Try it with gradient and
- bozo, for example. Or maybe marble with alpha 1.0 for all but the
- "veins".
- Try a series of "nested" concentric spheres, all with the transparent
- checker pattern as its surface, perhaps in different colors.
- }
-
- composite
- object { QSphere with transparent checker sections }
- sphere <0.0 25.0 0.0 > 25.0 end_sphere
- texture
- checker colour YellowGreen colour White alpha 1.0
- scale <2.0 500.0 1.0>
- rotate <90 0.0 -90.0>
- end_texture
- color White alpha 1.0
- end_object
-
- bounded_by
- sphere <0.0 25.0 0.0> 25.2 end_sphere
- end_bound
- end_composite
-