home *** CD-ROM | disk | FTP | other *** search
- // Persistance of Vision Raytracer V1.0
- //
- // "Lilys", a raytrace by Douglas Otwell
- // Copyright 1993, Douglas Otwell
-
- #include "colors.inc"
- #include "textures.inc"
- #include "shapes.inc"
-
- camera { // Camera cam1
- location <0.2 5.0 -8.0>
- direction <0.0 0.0 2.0>
- sky <0.0 1.0 0.0>
- up <0.0 1.0 0.0>
- right <1.3333 0.0 0.0>
- look_at <0.000 1.0 0.000>
- }
-
- object {
- light_source {
- <0 20 -12>
- color White
- spotlight
- point_at <-1 0.5 3>
- tightness 2
- radius 3
- falloff 8
- }
- }
- object {
- light_source {
- <2.5 20 -12>
- color White
- spotlight
- point_at <1 0 -1>
- tightness 1
- radius 3
- falloff 8
- }
- }
-
- #declare OrangeYellow = color red 1.0 green 0.65 blue 0.0
-
- #declare lily_texture1 = texture {
- leopard
- turbulence 0.5
- color_map {
- [0.0 0.25 color OrangeYellow color OrangeYellow]
- [0.25 0.55 color OrangeYellow color Brown]
- [0.55 1.0 color Brown color Brown]
- }
- scale <0.05 0.05 0.0125>
-
- }
- #declare lily_texture2 = texture {
- onion
- turbulence 0.05
- color_map {
- [0.0 0.35 color Clear color Clear]
- [0.35 0.65 color Clear color OrangeYellow]
- [0.65 1.0 color OrangeYellow color Orange]
- }
- scale <1.01 1.01 0.51>
- translate <0 1 0>
- rotate <0 0 -45>
-
- wrinkles 1.0
- }
- #declare lily_texture =
- texture {lily_texture1 ambient 0.0 diffuse 1.0}
- texture {lily_texture2 ambient 0.0 diffuse 1.0}
-
- #declare sphere_x = 1
- #declare sphere_y = 1
- #declare sphere_z = 0.5
-
- #declare leaf_texture = texture {
- leopard
- turbulence 1.0
- color_map {
- [0.0 0.1 color ForestGreen color MediumForestGreen]
- [0.1 0.4 color MediumForestGreen color White]
- [0.4 0.6 color White color GreenYellow]
- [0.6 1.001 color GreenYellow color GreenYellow]
- }
- scale <0.1 0.1 0.1>
- phong 1.0 phong_size 70.0
- }
-
- #declare lily_petal = object {
- quartic { // Torus MinRadius= 0.500 MajRadius= 1.500
- < 1.000 0.000 0.000 0.000 2.000
- 0.000 0.000 2.000 0.000 -5.000
- 0.000 0.000 0.000 0.000 0.000
- 0.000 0.000 0.000 0.000 0.000
- 1.000 0.000 0.000 2.000 0.000
- -5.000 0.000 0.000 0.000 0.000
- 1.000 0.000 4.000 0.000 4.000 >
- sturm
- translate <1 0 0>
- }
- clipped_by {
- quadric {
- Sphere
- scale <1 1 0.5>
- translate <0 1 0>
- rotate <0 0 -45>
- }
- }
- bounded_by {
- quadric {
- Sphere
- scale <1 1 0.5>
- translate <0 1 0>
- rotate <0 0 -45>
- }
- }
- texture {lily_texture}
- }
-
- // lily_petals
- #declare lily_petals = composite {
- object {
- lily_petal
-
- scale <1 2.0 1>
- translate <0.2 0 0>
- rotate <0 -90 0 >
- }
- object {
- lily_petal
-
- scale <1.2 1.3 1.2>
- translate <0.2 0 0>
- rotate <0 30 0 >
- }
- object {
- lily_petal
-
- scale <1 1.65 1>
- translate <0.2 0 0>
- rotate <0 150 0 >
- }
-
- object {
- lily_petal
-
- scale <1 1.7 1>
- rotate <0 0 -15>
- translate <0.2 0 0>
- rotate <0 -30 0 >
- }
- object {
- lily_petal
-
- scale <1 1.6 1>
- rotate <0 0 -15>
- translate <0.2 0 0>
- rotate <0 90 0 >
- }
- object {
- lily_petal
-
- scale <1 2.0 1>
- rotate <0 0 -15>
- translate <0.2 0 0>
- rotate <0 210 0 >
- }
- }
-
- // sepal
- #declare sepal = object {
- union {
- difference {
- quadric {Ellipsoid scale <0.25 1 0.25>}
- quadric {Ellipsoid scale <0.25 1 0.25> translate <0 0.1 0>}
- }
- sphere {<0 0 0> 0.25}
- }
- texture {
- color ForestGreen
- phong 1.0
- bumps 1.0
- scale <0.1 1 0.1>
- }
- }
-
- // stamen
- #declare stamen = composite {
- object {
- intersection {
- quartic {
- <1 0 0 0 2 0 0
- 2 0 -18.000450 0 0 0 0
- 0 0 0 0 0 0 1
- 0 0 2 0 17.999550 0 0
- 0 0 1 0 -18.000450 0 80.995949>
- }
- plane {<0 0 1> 0 inverse}
- plane {<0 0 1> 0 rotate <0 -50.000000 0>}
- }
- bounded_by {
- box {<1.918721 -0.015000 0.000000>
- <3.015000 0.015000 2.309624>}
- }
- texture {color YellowGreen phong 1.0 phong_size 120}
- rotate <-90 0 0>
- }
- object {
- union {
- quadric {Ellipsoid scale <0.08 0.02 0.02> translate <0 0 0.01>}
- quadric {Ellipsoid scale <0.08 0.02 0.02> translate <0 0 -0.01>}
- }
- texture {color Brown}
- translate <3 0 0>
- rotate <0 0 50>
- }
- translate <-3 0 0>
- }
-
- //stem
- #declare stem = object {
- // Major radius: 12.000000 Minor radius: 0.080000
- intersection {
- quartic {
- <1 0 0 0 2 0 0
- 2 0 -288.012787 0 0 0 0
- 0 0 0 0 0 0 1
- 0 0 2 0 287.987213 0 0
- 0 0 1 0 -288.012787 0 20734.156250>
- }
- plane {<0 0 1> 0 inverse}
- plane {<0 0 1> 0 rotate <0 -60.000000 0>}
- }
- bounded_by {
- box {<5.960000 -0.080000 0.000000>
- <12.080000 0.080000 10.461587>}
- }
- texture {
- color ForestGreen
- phong 1.0
- }
- rotate <90 0 0>
- translate <-12 -1 0>
- }
-
- // lily
- #declare lily = composite {
- composite {lily_petals}
- object {sepal}
- object {stem}
- composite {stamen}
- composite {
- stamen
- rotate <0 0 -15>
- rotate <0 170 0>
- }
- composite {
- stamen
- rotate <0 0 -30>
- rotate <0 80 0>
- }
- composite {
- stamen
- rotate <0 0 -25>
- rotate <0 30 0>
- }
- composite {
- stamen
- rotate <0 0 -20>
- rotate <0 340 0>
- }
- composite {
- stamen
- rotate <0 0 -35>
- rotate <0 290 0>
- }
- composite {
- stamen
- rotate <0 0 -10>
- rotate <0 240 0>
- }
-
- bounded_by {sphere {<0 0 0> 3.5}}
- }
-
- #declare bud = composite {
- object {
- union {
- quadric {Ellipsoid scale <0.25 1.125 0.25> translate <-0.08 0 -0.08>}
- quadric {Ellipsoid scale <0.25 1.125 0.25> translate <0.08 0 -0.08>}
- quadric {Ellipsoid scale <0.25 1.125 0.25> translate <0.08 0 0.08>}
- quadric {Ellipsoid scale <0.25 1.125 0.25> translate <-0.08 0 0.08>}
- }
- texture {
- color OrangeYellow
- wrinkles 0.8
- scale <0.125 3 0.125>
- }
- translate <0 1 0>
- }
- object {sepal}
- object {stem}
- }
-
- //
- // The Scene Description
- //
-
- composite {
- lily
- rotate <0 45 0>
- translate <-1 -0.5 3>
- }
- composite {
- lily
- translate <1 -1 -1>
- }
- composite {
- bud
- rotate <-20 0 45>
- translate <2.5 1 2.5>
- }
- composite {
- bud
- rotate <0 0 35>
- rotate <0 -75 0>
- translate <-3.5 -1 5>
- }
- composite {
- bud
- rotate <0 0 35>
- rotate <0 135 0>
- translate <-3 -1.5 0.5>
- }
-
-
- // Sky
- object {
- sphere {<0 0 0> 100}
- texture {
- bozo
- color_map {
- [0.0 0.4 color Gray20 color Gray20]
- [0.4 1.0 color Gray20 color Gray50]
- }
- ambient 0.4 diffuse 0.0
-
- scale <8 8 8>
- translate <0 100 0>
- }
- texture {
- bozo
- turbulence 0.1
- color_map {
- [0.0 0.1 color OrangeYellow color OrangeYellow]
- [0.1 0.5 color OrangeYellow color Clear]
- [0.5 1.0 color Clear color Clear]
- }
- ambient 0.4 diffuse 0.0
-
- scale <16 16 16>
- }
- }
-
-