home *** CD-ROM | disk | FTP | other *** search
- //Moon City by Mike Williams
- //111 Evering Road, London N16 7SL
-
-
-
- // **** DONT ANTI-ALIAS THIS **** //
-
- // If you use anti-aliasing it smoothes away the stars in the sky
- // which should be single points.
-
-
-
- #include "shapes"
- #include "colors"
- #include "textures"
-
- camera
- { location <0 5 -20>
- up <0 1 0>
- right <1.25 0 0>
- look_at <0 0 0>
- }
- // Lights
- object { light_source { <5 20 -50> colour White } }
- object { light_source { <-5 20 -25> colour White } }
- // floor
-
- #declare crater =
- difference
- { intersection {Cone_Y scale <1 0.3 1>}
- sphere {<0 1 0> 1.06}
- }
-
- #declare pock1 =
- quadric {Ellipsoid scale <3 1 3> translate <0 0.5 0>}
-
- #declare pock2 =
- quadric {Ellipsoid scale <2 0.5 2> translate <0 0.25 0>}
-
- #declare Starry_Sky =
- texture
- { marble
- turbulence 1
- ambient 1
- diffuse 0
- colour_map
- { [0.0 0.97 colour Black colour Black]
- [0.97 1.01 colour Black colour White]
- }
- }
-
- #declare Cockpit =
- object
- { intersection
- { sphere {<0 0 0> 4}
- box {<-4 1 -4><0 2.5 4>}
- }
- texture
- { Shiny
- colour Clear
- refraction 0.7
- ior 1.1
- reflection 0.1
- }
- }
-
- #declare Wheel_Ball =
- object
- { difference
- { sphere {<0 0 0> 2.5}
- sphere {<0 0 2.5> 1}
- }
- texture
- { granite
- colour_map
- { [0 1 colour Gray15 colour Gray30]
- }
- }
- }
-
- #declare Fuselage =
- object
- { union
- { intersection {Disk_X scale <5 1 1> }
- sphere {<0 0 0> 3}
- sphere {<8 0 0> 4}
- difference
- { sphere {<-8 0 0> 4}
- box {<-12 1 -4><-8 2.5 4>}
- }
- }
- texture
- { Silver_Texture }
- }
-
- #declare Rover_Body =
- object
- { union
- { difference
- { sphere {<0 0 0> 4}
- box {<-4 1 -4><0 2.5 4>}
- }
- sphere {<-3 -2 -2> 1}
- sphere {<-3 -2 1> 1}
- box {<-0.5 -8 -5><0.5 0.5 -4> rotate <0 0 45>}
- box {<-0.5 -8 -5><0.5 0.5 -4> rotate <0 0 -45>}
- box {<-0.5 -8 5><0.5 0.5 4> rotate <0 0 45>}
- box {<-0.5 -8 5><0.5 0.5 4> rotate <0 0 -45>}
- }
- texture
- { Silver_Texture }
- }
-
- #declare Track =
- composite
- { object
- { union
- { intersection {Disk_Z scale <1.5 1.5 1> translate <-5 0 0>}
- intersection {Disk_Z scale <1.5 1.5 1> translate < 5 0 0>}
- box {<-5 -1.5 -1> <5 1.5 1>}
- }
- texture
- { granite
- colour_map
- { [0 1 colour DarkGreen colour Gray10]
- }
- }
- bounded_by { box { <-6.5 -1.5 -1><6.5 1.5 1>}}
- }
- object
- { union
- { intersection {Disk_Z scale <1.3 1.3 1.2> translate <-5 0 0>}
- intersection {Disk_Z scale <1.3 1.3 1.2> translate < 5 0 0>}
- box {<-4.8 -0.6 -1.2> <4.8 1.3 1.2>}
- }
- texture { Silver_Texture }
- bounded_by { box { <-6.5 -1.5 -1.2><6.5 1.5 1.2>}}
- }
- }
-
- #declare leg =
- union
- { sphere { <0 0 0> 2.2 }
- quadric { Ellipsoid scale <2 5 2> translate <0 -4 0> }
- quadric { Ellipsoid scale <1.6 5 1.8> translate <0 -4 0>
- rotate <-20 0 0> translate <0 -6 0> }
- quadric { Ellipsoid scale <1 1 3> translate <0 -14 1> }
- }
-
- #declare arm =
- union
- { sphere { <0 0 0> 1.8 }
- quadric { Ellipsoid scale <1.6 5 1.6> translate <0 -4 0> }
- quadric { Ellipsoid scale <1.2 4 1.3> translate <0 -4 0>
- rotate <20 0 0> translate <0 -4 0> }
- }
-
- #declare Torso =
- object
- { union
- { union {leg translate <-2 0 0>}
- union {leg translate < 2 0 0>}
- union {arm rotate <0 0 -20> translate <-3 8 0>}
- union {arm rotate <0 0 20> translate < 3 8 0>}
- quadric {Sphere scale <3.5 3.5 2.4> translate <0 1.5 0> }
- quadric {Sphere scale <3.5 3.5 2.4> translate <0 3.5 0> }
- quadric {Sphere scale <3.8 3.5 2.4> translate <0 6 0> }
- sphere {<0 9 0> 2}
- }
- texture
- { Silver_Texture
- }
- }
-
- #declare Helmet =
- composite
- { object
- { sphere {<0 0 -0.5> 0.8}
- texture
- { Shiny
- colour Clear
- refraction 0.4
- reflection 0.1
- ior 1.2
- }
- }
- object
- { difference
- { sphere {<0 0 -0.2> 1}
- sphere {<0 0 -0.5> 0.8}
- }
- texture {Silver_Texture}
- }
- }
-
- #declare Moon_Bus =
- composite
- { object {Fuselage}
- object {Cockpit translate <-8 0 0>}
- object {Wheel_Ball translate <-5.5 -3.5 5.5>}
- object {Wheel_Ball translate < 0 -3.5 5.5>}
- object {Wheel_Ball translate < 5.5 -3.5 5.5>}
- object {Wheel_Ball rotate <0 180 0> translate <-5.5 -3.5 -5.5>}
- object {Wheel_Ball rotate <0 180 0> translate < 0 -3.5 -5.5>}
- object {Wheel_Ball rotate <0 180 0> translate < 5.5 -3.5 -5.5>}
- bounded_by {box{<-12 -6 -8> <12 4 8>}}
- }
-
- #declare Rover =
- composite
- { object {Rover_Body}
- object {Cockpit}
- composite {Track translate <0 -4.5 -6>}
- composite {Track translate <0 -4.5 6>}
- bounded_by {box{<-7 -6 -7.2><7 4 7.2>}}
- }
-
- #declare Space_Suit =
- composite
- { object {Torso}
- composite {Helmet scale <3 3 3> translate <0 12 0>}
- bounded_by { box {<-8 -14 -8> <8 15 8>} }
- translate <0 14 0>
- scale <0.2 0.2 0.2>
- }
-
- // Sky
- object { sphere { <0 -39000 0> 40000 inverse }
- texture {Starry_Sky} }
-
- // floor
- object
- { union
- { difference
- { plane { <0 1 0> 0 }
-
- quadric {pock1 translate <-2 0 -4>}
- quadric {pock1 translate <3 0 0>}
- quadric {pock1 translate <-8 0 16>}
- quadric {pock1 translate <15 0 20>}
-
- quadric {pock2 translate <4 0 -3>}
- quadric {pock2 translate <-3 0 3>}
- quadric {pock2 translate <-1 0 -2>}
- quadric {pock2 translate <9 0 -7>}
- quadric {pock2 translate <-10 0 -6>}
- quadric {pock2 translate <-8 0 -13>}
- quadric {pock2 translate <0 0 -14>}
- }
- difference {crater scale <20 20 20>}
- difference {crater scale <10 10 10> translate <1 0 -15>}
- }
- texture
- { agate
- colour_map
- { [0.0 0.5 colour LightGrey colour red 0.7 green 0.7 blue 0.6]
- [0.5 1.01 colour red 0.7 green 0.7 blue 0.6 colour LightGrey]
- }
- scale <3 3 3>
- }
- bounded_by {plane {<0 1 0> 3}}
-
- }
-
- // To make the design simple, the Moon_Bus has been created with the
- // tyres standing on a surface at a Y value of -6.
- // So translate it back up to the real floor.
-
- composite
- { Moon_Bus
- rotate <0 -80 0>
- translate <-8 5.5 8>
- }
-
- // To make the design simple, the Rover has been created with the
- // tyres standing on a surface at a Y value of -6.
- // So translate it back up to the real floor.
-
- composite
- { Rover
- rotate <0 -40 0>
- translate <8 6 5>
- }
-
- // The space suit should be about the right size and standing on the floor
- // so just create some in suitable positions.
-
- composite {Space_Suit rotate <0 -40 0>}
- composite {Space_Suit translate <2 0 5>}
- composite {Space_Suit translate <-2 0 -8>}
- composite {Space_Suit rotate <0 40 0> translate <4 0 -7>}
-
-