home *** CD-ROM | disk | FTP | other *** search
- // a submarine floating in the water...
- // my first real rayce scene
- // the sub might make a wonderful object for hierarchical bounding boxes.
-
- // HWN
-
- #include "colors.inc"
- #include "shapes.inc"
- camera {
- location <-10, 10, -30>
- sky <0, 1, 0>
- fov 80
- aspect 1.333
- look_at <0, 0, 0>
- }
-
- options {
- background color SkyBlue
- time 0.0, 2.0
- iterations 16
- }
-
- #declare water = object {
- plane { <0, 1, 0>, 0 }
- texture {
- diffuse color green .1 blue .05
- specular color red .05 green .15 blue .12
- ambient color CornflowerBlue
- reflection color Grey50
- reflection 0.8
- reflect_angle 3
- }
- }
-
- #declare hull = texture {
- ambient color Grey10
- diffuse color red 0.1 blue 0.2 green 0.2
- specular color red 0.1 blue 0.2 green 0.2
- roughness 0.7
- }
-
- #declare sub = composite {
- object {
- quadric { Ellipsoid }
- scale <20, 3, 3>
- }
- object {
- box { <-10, 0, -2>, <10, 3, 2> }
- }
- object { // flap
- polygon { <18, 0, 0>, <22, 0, 0>, <22, 5, 0>, <18, 5, 0> }
- }
- object {
- triangle { <18, 0 ,0>, <18, 5, 0>, <16.5, 0, 0> }
- }
-
- object {
- polygon { <-3, 5, -4>, <0, 5, -4>, <0, 5, 4>, <-3, 5, 4> translate <2, 0 , 0> }
- }
- object { // command tower
- intersection {
- Y_Disk
- scale <2.5, 4, 1>
- translate <0, 3, 0>
- }
- }
-
- /* make love, not war */ /* oeps, foutje :) */
- object { // cannon tower
- union {
- sphere { <-8, 3, 0>, 1 }
- intersection {
- X_Disk
- scale <-1, 0.2, 0.2>
- translate <-8.8, 3.3, 0>
- }
- }
- texture {
- ambient color Grey20
- diffuse color Grey70
- }
- }
- texture { hull }
- bounded_by { box { <-22, -3, -3>, <22, 6, 3> } }
- }
-
- composite {
- sub
- }
-
- object { water }
-
- object {
- light_source { <-30, 100, -20> color White }
- }
-