home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / resources / jpeg / scenes / MoonScape < prev    next >
Encoding:
Text File  |  1995-04-03  |  6.3 KB  |  293 lines

  1. //Moon City by Mike Williams
  2. //111 Evering Road, London N16 7SL
  3.  
  4.  
  5.  
  6. // **** DONT ANTI-ALIAS THIS **** //
  7.  
  8. // If you use anti-aliasing it smoothes away the stars in the sky
  9. // which should be single points.
  10.  
  11.  
  12.  
  13. #include "shapes"
  14. #include "colors"
  15. #include "textures"
  16.  
  17. camera
  18. { location <0 5 -20>
  19.   up <0 1 0>
  20.   right <1.25 0 0>
  21.   look_at <0 0 0>
  22. }
  23. // Lights
  24. object { light_source { <5 20 -50> colour White } }
  25. object { light_source { <-5 20 -25> colour White } }
  26. // floor
  27.  
  28. #declare crater =
  29. difference
  30. { intersection {Cone_Y scale <1 0.3 1>}
  31.     sphere {<0 1 0> 1.06}
  32. }
  33.  
  34. #declare pock1 =
  35. quadric {Ellipsoid scale <3 1 3> translate <0 0.5 0>}
  36.  
  37. #declare pock2 =
  38. quadric {Ellipsoid scale <2 0.5 2> translate <0 0.25 0>}
  39.  
  40. #declare Starry_Sky =
  41. texture
  42. { marble
  43.   turbulence 1
  44.   ambient 1
  45.   diffuse 0
  46.   colour_map
  47.   { [0.0 0.97 colour Black colour Black]
  48.     [0.97 1.01 colour Black colour White]
  49.   }
  50. }
  51.  
  52. #declare Cockpit =
  53. object
  54. { intersection
  55.   { sphere {<0 0 0> 4}
  56.     box {<-4 1 -4><0 2.5 4>}
  57.   }
  58.   texture
  59.   { Shiny
  60.     colour Clear
  61.     refraction 0.7
  62.     ior 1.1
  63.     reflection 0.1
  64.   }
  65. }
  66.  
  67. #declare Wheel_Ball =
  68. object
  69. { difference
  70.   { sphere {<0 0 0> 2.5}
  71.     sphere {<0 0 2.5> 1}
  72.   }
  73.   texture 
  74.   { granite
  75.     colour_map
  76.     { [0 1 colour Gray15 colour Gray30]
  77.     }
  78.   }
  79. }
  80.  
  81. #declare Fuselage =
  82. object
  83. { union
  84.   { intersection {Disk_X scale <5 1 1> }
  85.     sphere {<0 0 0> 3}
  86.     sphere {<8 0 0> 4}
  87.     difference
  88.     { sphere {<-8 0 0> 4}
  89.       box {<-12 1 -4><-8 2.5 4>}
  90.     }
  91.   }
  92.   texture
  93.   { Silver_Texture }
  94. }
  95.  
  96. #declare Rover_Body =
  97. object
  98. { union
  99.   { difference
  100.     { sphere {<0 0 0> 4}
  101.       box {<-4 1 -4><0 2.5 4>}
  102.     }
  103.     sphere {<-3 -2 -2> 1}
  104.     sphere {<-3 -2  1> 1}
  105.     box {<-0.5 -8 -5><0.5 0.5 -4> rotate <0 0 45>}
  106.     box {<-0.5 -8 -5><0.5 0.5 -4> rotate <0 0 -45>}
  107.     box {<-0.5 -8  5><0.5 0.5  4> rotate <0 0 45>}
  108.     box {<-0.5 -8  5><0.5 0.5  4> rotate <0 0 -45>}
  109.   }
  110.   texture
  111.   { Silver_Texture }
  112. }
  113.  
  114. #declare Track =
  115. composite
  116. { object
  117.   { union
  118.     { intersection {Disk_Z scale <1.5 1.5 1> translate <-5 0 0>}
  119.       intersection {Disk_Z scale <1.5 1.5 1> translate < 5 0 0>}
  120.       box {<-5 -1.5 -1> <5 1.5 1>}
  121.     }
  122.     texture
  123.     { granite
  124.       colour_map
  125.       { [0 1 colour DarkGreen colour Gray10] 
  126.       }
  127.     }
  128.     bounded_by { box { <-6.5 -1.5 -1><6.5 1.5 1>}}
  129.   }
  130. object
  131.   { union
  132.     { intersection {Disk_Z scale <1.3 1.3 1.2> translate <-5 0 0>}
  133.       intersection {Disk_Z scale <1.3 1.3 1.2> translate < 5 0 0>}
  134.       box {<-4.8 -0.6 -1.2> <4.8 1.3 1.2>}
  135.     }
  136.     texture { Silver_Texture }
  137.     bounded_by { box { <-6.5 -1.5 -1.2><6.5 1.5 1.2>}}
  138.   }
  139. }
  140.  
  141. #declare leg =
  142. union
  143. { sphere { <0 0 0> 2.2 }
  144.   quadric { Ellipsoid scale <2 5 2> translate <0 -4 0> }
  145.   quadric { Ellipsoid scale <1.6 5 1.8> translate <0 -4 0>
  146.                       rotate <-20 0 0> translate <0 -6 0> }
  147.   quadric { Ellipsoid scale <1 1 3> translate <0 -14 1> }
  148. }
  149.  
  150. #declare arm =
  151. union
  152. { sphere { <0 0 0> 1.8 }
  153.   quadric { Ellipsoid scale <1.6 5 1.6> translate <0 -4 0> }
  154.   quadric { Ellipsoid scale <1.2 4 1.3> translate <0 -4 0>
  155.                       rotate <20 0 0> translate <0 -4 0> }
  156. }
  157.  
  158. #declare Torso =
  159. object
  160. { union 
  161.   { union {leg translate <-2 0 0>}
  162.     union {leg translate < 2 0 0>}
  163.     union {arm rotate <0 0 -20> translate <-3 8 0>}
  164.     union {arm rotate <0 0  20> translate < 3 8 0>}
  165.     quadric {Sphere scale <3.5 3.5 2.4> translate <0 1.5 0> }
  166.     quadric {Sphere scale <3.5 3.5 2.4> translate <0 3.5 0> }
  167.     quadric {Sphere scale <3.8 3.5 2.4> translate <0 6   0> }
  168.     sphere {<0 9 0> 2}
  169.   }
  170.   texture
  171.   { Silver_Texture
  172.   }
  173. }
  174.  
  175. #declare Helmet =
  176. composite
  177. { object
  178.   { sphere {<0 0 -0.5> 0.8}
  179.     texture
  180.     { Shiny
  181.       colour Clear
  182.       refraction 0.4
  183.       reflection 0.1
  184.       ior 1.2
  185.     } 
  186.   }
  187.   object
  188.   { difference
  189.     { sphere {<0 0 -0.2> 1}
  190.       sphere {<0 0 -0.5> 0.8}
  191.     }
  192.     texture {Silver_Texture}
  193.   }
  194. }
  195.  
  196. #declare Moon_Bus =
  197. composite
  198. { object {Fuselage}
  199.   object {Cockpit translate <-8 0 0>}
  200.   object {Wheel_Ball translate <-5.5 -3.5 5.5>}
  201.   object {Wheel_Ball translate < 0   -3.5 5.5>}
  202.   object {Wheel_Ball translate < 5.5 -3.5 5.5>}
  203.   object {Wheel_Ball rotate <0 180 0> translate <-5.5 -3.5 -5.5>}
  204.   object {Wheel_Ball rotate <0 180 0> translate < 0   -3.5 -5.5>}
  205.   object {Wheel_Ball rotate <0 180 0> translate < 5.5 -3.5 -5.5>}
  206.   bounded_by {box{<-12 -6 -8> <12 4 8>}}
  207. }
  208.  
  209. #declare Rover =
  210. composite
  211. { object {Rover_Body}
  212.   object {Cockpit}
  213.   composite {Track translate <0 -4.5 -6>}
  214.   composite {Track translate <0 -4.5 6>}
  215.   bounded_by {box{<-7 -6 -7.2><7 4 7.2>}}
  216. }
  217.  
  218. #declare Space_Suit =
  219. composite
  220. { object {Torso}
  221.   composite {Helmet scale <3 3 3> translate <0 12 0>}
  222.   bounded_by { box {<-8 -14 -8> <8 15 8>} }
  223.   translate <0 14 0>
  224.   scale <0.2 0.2 0.2>
  225. }
  226.  
  227. // Sky
  228. object { sphere { <0 -39000 0> 40000 inverse }
  229.   texture {Starry_Sky} }
  230.  
  231. // floor
  232. object
  233. { union
  234.   { difference
  235.     { plane { <0 1 0> 0 }
  236.  
  237.       quadric {pock1 translate <-2 0 -4>}
  238.       quadric {pock1 translate <3 0 0>}
  239.       quadric {pock1 translate <-8 0 16>}
  240.       quadric {pock1 translate <15 0 20>}
  241.  
  242.       quadric {pock2 translate <4 0 -3>}
  243.       quadric {pock2 translate <-3 0 3>}
  244.       quadric {pock2 translate <-1 0 -2>}
  245.       quadric {pock2 translate <9 0 -7>}
  246.       quadric {pock2 translate <-10 0 -6>}
  247.       quadric {pock2 translate <-8 0 -13>}
  248.       quadric {pock2 translate <0 0 -14>}
  249.     }
  250.     difference {crater scale <20 20 20>}
  251.     difference {crater scale <10 10 10> translate <1 0 -15>}
  252.   }
  253.   texture
  254.   { agate
  255.     colour_map
  256.     { [0.0 0.5 colour LightGrey colour red 0.7 green 0.7 blue 0.6]
  257.       [0.5 1.01 colour red 0.7 green 0.7 blue 0.6 colour LightGrey]
  258.     }
  259.     scale <3 3 3>
  260.   }
  261.   bounded_by {plane {<0 1 0> 3}}
  262.  
  263. }
  264.  
  265. // To make the design simple, the Moon_Bus has been created with the
  266. // tyres standing on a surface at a Y value of -6.
  267. // So translate it back up to the real floor.
  268.  
  269. composite
  270. { Moon_Bus
  271.   rotate <0 -80 0>
  272.   translate <-8 5.5 8>
  273. }
  274.  
  275. // To make the design simple, the Rover has been created with the
  276. // tyres standing on a surface at a Y value of -6.
  277. // So translate it back up to the real floor.
  278.  
  279. composite
  280. { Rover
  281.   rotate <0 -40 0>
  282.   translate <8 6 5>
  283. }
  284.  
  285. // The space suit should be about the right size and standing on the floor
  286. // so just create some in suitable positions.
  287.  
  288. composite {Space_Suit rotate <0 -40 0>}
  289. composite {Space_Suit translate <2 0 5>}
  290. composite {Space_Suit translate <-2 0 -8>}
  291. composite {Space_Suit rotate <0 40 0> translate <4 0 -7>}
  292.  
  293.