home *** CD-ROM | disk | FTP | other *** search
- // more CSG
-
- camera {
- location <0, 0, 3.0>
- fov 120
- look_at <0, 0, 0>
- }
-
- options { background y color rgb <0.2, 0.2, 0.2> }
-
- #declare WeirdGreen = texture { /* any suggestions for a better name? */
- diffuse color red 0.8 blue 0.8 ambient color green 0.2
- }
-
- #declare Disk_X = intersection {
- quadric { <0, 1, 1>, <0, 0, 0>, <0, 0, 0>, -1 }
- plane { <1, 0, 0>, 1 }
- plane { <-1, 0, 0>, 1 }
- }
-
- #declare difficult = intersection {
- union {
- box { <2, 2, 4>, <-2, -2, 0> }
- intersection { Disk_X scale < 2, 2, 2> }
-
- }
- intersection {
- plane { <1, 0, 0>, 0.5 rotate <0, -45, 0> }
- plane { <-1, 0, 0>, 0.5 rotate <0, 45, 0> }
- inverse
- translate <0, 0, -0.75> // translate test
- }
- }
-
- #declare identicaltwin = union {
- intersection {
- box { <2, 2, 4>, <-2, -2, 0> inverse }
- intersection { Disk_X scale <2, 2, 2> inverse }
- inverse
- }
- union {
- plane { <1, 0, 0>, 0.5 rotate <0, -45, 0> inverse }
- plane { <-1, 0, 0>, 0.5 rotate <0, 45, 0> inverse }
- translate <0, 0, -0.75> // translate test
- }
- inverse
- }
-
- #declare csg7 = composite {
- object {
- union { identicaltwin }
- // intersection { difficult }
- texture { WeirdGreen }
- }
- object { light_source { <0.5, -1.5, 1.5> color red 1.0 } }
- }
-
- composite { csg7 }
-
-
-
-