home *** CD-ROM | disk | FTP | other *** search
- // Persistence of Vision Raytracer
- #include "colors.inc"
- #include "shapes.inc"
- #include "textures.inc"
-
- #declare Limestone1 = color red 0.941 green 0.871 blue 0.761
-
- camera {
- location <4 8.5 -14>
- direction <0.0 0.0 1.5>
- up <0.0 1.0 0.0>
- right <1.33333 0.0 0.0>
- look_at <0.0 6.0 0.0>
- }
-
-
- object {light_source {<10 30 -30> color White}}
-
- fog {120 color SkyBlue}
-
- object {
- sphere {<0 0 0> 1000}
- texture {
- color SkyBlue
- ambient 1.0 diffuse 0.0
- }
- }
-
- object {
- plane {<0 1 0> 0 }
- texture {checker color Gray80 color Gray60 scale <3 1 1.6>}
- }
-
- //----------------------------------------------------------------------------
- // potted palm
- // This is the palm plant used in Altar.gif, available in the GRAPHDEV
- // forum of Compuserve. It is made of flattened shperiods, clipped by
- // a clynder, like crescent moons. These are scaled and arranged in a
- // fan-like manner. The stems are cones with thier points cut off.
- //----------------------------------------------------------------------------
-
- #declare frond = object {
- quadric {
- Ellipsoid
- scale <2 2 0.2>
- translate <0 -1.9 0>
- }
- clipped_by {
- quadric {
- Cylinder_Z inverse
- scale <2.5 2.5 1>
- translate <0 -2.5 0>
- }
- }
-
- translate <1.225 0.325 0>
- rotate <0 0 -10>
-
- texture {
- onion
- turbulence 0.1
- color_map {
- [0.0 0.4 color SeaGreen color SeaGreen]
- [0.4 0.5 color SeaGreen color DarkGreen]
- [0.5 1.0 color DarkGreen color DarkGreen]
- }
- //ambient 0.2
-
- bumps 1.0
- scale <4 4 0.1>
- phong 1.0 phong_size 20
- }
-
- }
-
- #declare fronds = composite {
- object {
- frond
- }
- object {
- frond
- scale <0.9 1 1>
- rotate <0 15 0>
- }
- object {
- frond
- scale <0.9 1 1>
- rotate <0 -15 0>
- }
- object {
- frond
- scale <0.8 1 1>
- rotate <0 30 0>
- }
- object {
- frond
- scale <0.8 1 1>
- rotate <0 -30 0>
- }
- object {
- frond
- scale <0.6 1 1>
- rotate <0 45 0>
- }
- object {
- frond
- scale <0.6 1 1>
- rotate <0 -45 0>
- }
- object {
- frond
- scale <0.5 1 1>
- rotate <0 60 0>
- }
- object {
- frond
- scale <0.5 1 1>
- rotate <0 -60 0>
- }
- object {
- frond
- scale <0.4 1 1>
- rotate <0 80 0>
- }
- object {
- frond
- scale <0.4 1 1>
- rotate <0 -80 0>
- }
- object {
- frond
- scale <0.3 1 1>
- rotate <0 100 0>
- }
- object {
- frond
- scale <0.3 1 1>
- rotate <0 -100 0>
- }
-
- bounded_by {sphere {<0 0 0> 2 translate <1 0 0>}}
- }
-
-
- #declare potted_palm = composite {
- // pot
- object {
- union {
- intersection {
- quadric {Ellipsoid scale <1 0.6 1>}
- plane {<0 1 0> 0 inverse}
- }
- intersection {
- quadric {Ellipsoid scale <1 1.6 1>}
- plane {<0 1 0> 0}
- plane {<0 1 0> -1.4 inverse}
- }
- }
- clipped_by {sphere {<0 0 0> 0.5 inverse translate <0 0.6 0>}}
- translate <0 1.4 0>
-
- texture {
- image_map {gif "vase.gif" map_type 2}
- rotate <0 -90 0>
- wrinkles 1.0
- phong 0.25 phong_size 50
- scale <1 2.2 1>
- }
- }
-
- // branches
- composite {
- composite {
- object {
- intersection {Cone_Y scale <0.1 5 0.1> translate <0 5 0>}
- clipped_by {plane {<0 1 0> 5}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 40>
- translate <0 5 0>
- }
- rotate <0 0 -45>
- }
-
- composite {
- object {
- intersection {Cone_Y scale <0.1 4.2 0.1> translate <0 4.2 0>}
- clipped_by {plane {<0 1 0> 4.2}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 55>
- translate <0 4.2 0>
- }
- rotate <0 0 -25>
- rotate <0 35 0>
- }
- composite {
- object {
- intersection {Cone_Y scale <0.1 5.6 0.1> translate <0 5.6 0>}
- clipped_by {plane {<0 1 0> 5.6}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 50>
- translate <0 5.6 0>
- }
- rotate <0 0 -28>
- rotate <0 -45 0>
- }
-
- composite {
- object {
- intersection {Cone_Y scale <0.1 5.4 0.1> translate <0 5.4 0>}
- clipped_by {plane {<0 1 0> 5.4}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 65>
- translate <0 5.4 0>
- }
- rotate <0 0 -20>
- rotate <0 25 0>
- }
- composite {
- object {
- intersection {Cone_Y scale <0.1 5.8 0.1> translate <0 5.8 0>}
- clipped_by {plane {<0 1 0> 5.8}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 70>
- translate <0 5.8 0>
- }
- rotate <0 0 -15>
- rotate <0 -30 0>
- }
-
- composite {
- object {
- intersection {Cone_Y scale <0.1 6.4 0.1> translate <0 6.4 0>}
- clipped_by {plane {<0 1 0> 6.4}}
- texture {color DarkGreen}
- }
- composite {
- fronds
- rotate <0 0 77>
- translate <0 6.4 0>
- }
- }
-
- rotate <0 90 0>
- translate <0 1.75 0>
- }
- }
-
- composite {
- potted_palm
- }
-
- //----------------------------------------------------------------------------
- // columns
- //----------------------------------------------------------------------------
-
- declare column = composite {
- object {
- intersection {Disk_Y translate <0 1 0> scale <1 1.5 1>}
- texture {color Limestone1 wrinkles 1.0}
- }
- object {
- intersection {Disk_Y translate <0 1 0> scale <1.05 1.5 1.02>}
- texture {color Limestone1 wrinkles 1.0}
- translate <0 3.1 0>
- }
- object {
- intersection {Disk_Y translate <0 1 0> scale <0.95 1.5 0.95>}
- texture {color Limestone1 wrinkles 1.0}
- translate <0 6.2 0>
- }
- object {
- intersection {Disk_Y translate <0 1 0> scale <1.05 1.5 1.0>}
- texture {color Limestone1 wrinkles 1.0}
- translate <0 9.3 0>
- }
-
- object {
- quadric {Cylinder_Y scale <0.9 0.9 0.9>}
- texture {color Gray30 dents 1 scale <0.1 0.1 0.1>}
- }
- }
-
- //columns
- composite {column translate <-12 0 12>}
- composite {column rotate <0 60 0> translate <-6 0 12>}
- composite {column rotate <0 120 0> translate <0 0 12>}
- composite {column rotate <0 240 0> translate <6 0 12>}
-
-