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

  1. //  Mike Williams
  2. //   111 Evering Road
  3. //    LONDON N16 7SL
  4.  
  5. #include "colors"
  6. #include "textures"
  7. #include "shapes"
  8. #default { texture { phong 1 phong_size 50 ambient 0.5 diffuse 0.5}}
  9.  
  10. #declare C521 = colour red 1 green 0.4 blue 0.2
  11. #declare C522 = colour red 1 green 0.4 blue 0.4
  12. #declare C532 = colour red 1 green 0.6 blue 0.4
  13. #declare C533 = colour red 1 green 0.6 blue 0.6
  14.  
  15. #declare Cheek = texture
  16. { wood
  17.   colour_map {
  18.       [0.0 0.2  colour C521 colour C521]
  19.       [0.2 0.3  colour C521 colour C533]
  20.       [0.3 1.0  colour C533 colour C533]
  21.    }
  22.  
  23.    scale <2.5 2.5 2.5>
  24.    translate <-0.3 -0.3 0>
  25. }
  26.  
  27. #declare EyeTex = texture
  28. { onion
  29.   colour_map {
  30.       [0.00 0.08 colour Black   colour Black]
  31.       [0.08 0.26 colour SkyBlue colour SlateBlue]
  32.       [0.26 1.00 colour White   colour White]
  33.   }
  34.    scale <2.1 2.1 2.1>
  35.    translate <-1 0 0>
  36. }
  37.  
  38. #declare Skull_1 = object
  39. { union
  40.   { quadric {Ellipsoid scale <0.8 1 0.8>}
  41.     quadric {Ellipsoid scale <0.4 0.3 0.3>
  42.                        translate <-0.8 0 0>}
  43.   }
  44.   texture {Cheek}
  45.   colour C533
  46. }
  47.  
  48. #declare Eye_1 = object
  49. { sphere {<0 0 0> 1}
  50.   texture {EyeTex}
  51.   scale <0.2 0.2 0.2>
  52.   colour White
  53. }
  54.  
  55. #declare Hat_1 =object
  56. { intersection
  57.   { quadric { QCone_Y  translate <0 1 0>} 
  58.     box { <-2 -1 -2> <2 -0.6 2> }
  59.     scale <.5 -1 .5>
  60.   }
  61.   texture {colour Navy}
  62.   colour Navy
  63. }
  64.  
  65. #declare Peak_1 =object
  66. { intersection
  67.   { quadric { QCone_Y  translate <0 1 0>} 
  68.     box { <-2 -1 -2> <2 -0.6 2> }
  69.     scale <.5 1 .5>
  70.     translate <0 1.2 0>
  71.   }
  72.   clipped_by {sphere {<-1 1.6 0> 1.4}}
  73.   texture {colour Navy}
  74.   colour Red
  75. }
  76.  
  77. #declare Tash_1 = object 
  78. { union 
  79.   { intersection {Disk_Y scale <0.1 0.3 0.1> translate <-0.8 -0.3 0> rotate < 30 0 0>}
  80.     intersection {Disk_Y scale <0.1 0.3 0.1> translate <-0.8 -0.3 0> rotate < 15 0 0>}
  81.     intersection {Disk_Y scale <0.1 0.3 0.1> translate <-0.8 -0.3 0> rotate < 0 0 0>}
  82.     intersection {Disk_Y scale <0.1 0.3 0.1> translate <-0.8 -0.3 0> rotate <-15 0 0>}
  83.     intersection {Disk_Y scale <0.1 0.3 0.1> translate <-0.8 -0.3 0> rotate <-30 0 0>}
  84.   }
  85.   texture {colour Black}
  86.   colour Black
  87. }
  88.  
  89. #declare Torso_1 = object
  90. { quadric {Ellipsoid scale <1.1 1.2 1.1> translate <0 -1.8 0>}
  91.   texture {colour Navy}
  92.   colour Navy
  93. }
  94.  
  95. #declare Legs_1 = object
  96. { intersection {Disk_Y scale <0.7 2 0.7> translate <0 -4 0>}
  97.   texture {colour Black}
  98.   colour Red
  99. }
  100.   
  101. #declare Sleeve_1 = object
  102. { union
  103.   { sphere {<0 0 0> 0.35}
  104.     intersection {Disk_Y scale <0.35 1 0.35> translate <0 -1 0>}
  105.   }
  106.   texture {colour Navy}
  107.   colour Navy
  108. }
  109.  
  110. #declare Cuff_1 = object
  111. { intersection {Disk_Y scale <0.4 0.2 0.4> translate <0 -1.9 0>}
  112.   texture {colour White}
  113.   colour White
  114. }
  115.  
  116. #declare Hand_1 = object
  117. { sphere {<0 -2.2 0> 0.3}
  118.   texture {colour C533}
  119.   colour C533
  120. }
  121.  
  122. #declare Flag = composite
  123. { object
  124.   { intersection {Disk_X scale <1.4 0.1 0.1>
  125.                   translate <-1.4 -2.2 0>}
  126.     texture {colour Tan}
  127.     colour Tan
  128.   }
  129.   object
  130.   { box {<-2.8 -2.2 -0.05><-1 0 0.05>}
  131.     texture {colour Green}
  132.     colour Green
  133.   }
  134. }
  135.  
  136. #declare Head_1 = composite
  137. { object {Skull_1}
  138.   object {Eye_1 translate <-0.55 0.3 0.3>}
  139.   object {Eye_1 translate <-0.55 0.3 -0.3>}
  140.   object {Tash_1}
  141.   object {Hat_1  scale <.92 .92 .92> rotate <0 0 -10>} 
  142.   object {Peak_1 scale <.92 .92 .92> rotate <0 0 -10>}
  143.   bounded_by {sphere {<0 0 0> 1.3}}
  144. }
  145.  
  146. #declare Body_1 = composite
  147. { object {Torso_1}
  148.   object {Legs_1}
  149. }
  150.  
  151. #declare Arm_1 = composite
  152. { object {Sleeve_1}
  153.   object {Cuff_1}
  154.   object {Hand_1}
  155. }
  156.  
  157. #declare Railway_Guard = composite
  158. { composite {Head_1}
  159.   composite {Body_1}
  160.   composite {Arm_1 rotate <0 0 -45> translate <0 -1.8 -1.1>}
  161.   composite {Arm_1 rotate <0 0 -135> translate <0 -1.8 1.1>}
  162.   composite {Flag  rotate <0 0 -135> translate <0 -1.8 1.1>}
  163. // move up so he stands on floor Z=0
  164.   translate <0 4.4 0>
  165.   bounded_by {box {<-3 0 -3><3 8 3>}}
  166. }
  167.  
  168. #declare EyeTex2 = texture
  169. { onion
  170.   colour_map {
  171.       [0.00 0.08 colour Black   colour Black]
  172.       [0.08 0.26 colour SkyBlue colour Blue]
  173.       [0.26 1.00 colour White   colour White]
  174.   }
  175.    scale <2.1 2.1 2.1>
  176.    translate <-1 0 0>
  177. }
  178.  
  179. #declare Skull_2 = object
  180. { union
  181.   { difference 
  182.     { sphere {<0 0 0> 1}
  183.       intersection {Disk_X scale <0.3 0.15 0.15>
  184.                            translate <-1 -0.4 0>}
  185.     }
  186.     intersection {Disk_X scale <0.3 0.2 0.2> translate <-1 0 0>}
  187.   }
  188.   texture {Cheek}
  189.   colour C533
  190. }
  191.  
  192. #declare Eye_2 = object
  193. { sphere {<0 0 0> 1}
  194.   texture {EyeTex2}
  195.   scale <0.2 0.2 0.2>
  196.   colour White
  197. }
  198.  
  199. #declare Hair_2 =object
  200. { union
  201.  { intersection {Disk_X scale <.6 .4 .4> translate <0 1 0>}
  202.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate <-40 0 0>}
  203.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate <-80 0 0>}
  204.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate < 40 0 0>}
  205.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate < 80 0 0>}
  206.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate <120 0 0>}
  207.   intersection {Disk_X scale <.6 .4 .4> translate <0 1 0> rotate <-120 0 0>}
  208.   }
  209.   texture {colour Yellow}
  210.   colour Yellow
  211. }
  212.  
  213. #declare Torso_2 = object
  214. { quadric {Ellipsoid scale <1.1 1.2 1.1> translate <0 -1.8 0>}
  215.   texture {colour NeonBlue}
  216.   colour NeonBlue
  217. }
  218.  
  219. #declare Legs_2 = object
  220. { quadric {Paraboloid_Y scale <1 -1 1> translate <0 -1.7 0>}
  221.   texture {colour NeonBlue bumps 1 scale <0.2 2 0.2>}
  222.   colour NeonBlue
  223. }
  224.  
  225. #declare Apron_2 = object
  226. { intersection
  227.   { quadric {Paraboloid_Y scale <1.15 -1.15 1.15> translate <0 -1.7 0>}
  228.     box {<-3 -4 -0.9 ><0 -2 0.9>}
  229.   }
  230.   texture {colour White}
  231.   colour White
  232. }
  233.   
  234. #declare Sleeve_2 = object
  235. { union
  236.   { sphere {<0 0 0> 0.3}
  237.     intersection {Disk_Y scale <0.3 1 0.3> translate <0 -1 0>}
  238.   }
  239.   texture {colour C533}
  240.   colour C533
  241. }
  242.  
  243. #declare Hand_2 = object
  244. { sphere {<0 -2.2 0> 0.4}
  245.   texture {colour C533}
  246.   colour C533
  247. }
  248.  
  249. #declare Head_2 = composite
  250. { object {Skull_2}
  251.   object {Eye_2 translate <-0.8 0.3 0.3>}
  252.   object {Eye_2 translate <-0.8 0.3 -0.3>}
  253.   object {Hair_2}
  254.   bounded_by {sphere {<0 0 0> 1.6}}
  255. }
  256.  
  257. #declare Body_2 = composite
  258. { object {Torso_2}
  259.   object {Legs_2}
  260.   object {Apron_2}
  261. }
  262.  
  263. #declare Arm_2 = composite
  264. { object {Sleeve_2}
  265.   object {Hand_2}
  266. }
  267.  
  268. #declare Mrs_Biggins = composite
  269. { composite {Head_2}
  270.   composite {Body_2}
  271.   composite {Arm_2 scale <.9 .9 .9> rotate <15 0 0> translate <0 -1.8 -1.1>}
  272.   composite {Arm_2 scale <.9 .9 .9> rotate <15 0 -60> translate <0 -1.8 1.1>}
  273. // move up so she stands on floor Z=0
  274.   translate <0 4.8 0>
  275.   bounded_by {box{<-3 0 -3><3 9 3>}}
  276. }
  277.  
  278. #declare Skull_3 = object
  279. { union
  280.   { difference 
  281.     { sphere {<0 0 0> 1}
  282.       intersection {Disk_X scale <0.3 0.15 0.25>
  283.                            translate <-1 -0.4 0>}
  284.     }
  285.     quadric {Ellipsoid scale <0.3 0.2 0.2>
  286.                        translate <-1 0.4 0>
  287.                        rotate <0 0 30>}
  288.   }
  289.   texture {Cheek}
  290.   colour C533
  291. }
  292.  
  293. #declare Cap = object
  294. { intersection
  295.   { sphere {<0 0 0> 1.05}
  296.     plane {<0 -1 0> -0.5}
  297.   }
  298.   texture {colour MediumForestGreen}
  299.   colour MediumForestGreen
  300. }  
  301.  
  302. #declare Peak_3 = object
  303. { plane {<0 1 0> 0.5}
  304.   clipped_by {sphere {<-0.4 0 0> 1}}
  305.   texture {colour MediumForestGreen}
  306.   colour MediumForestGreen
  307. }
  308.  
  309. #declare Torso_3 = object
  310. { intersection {Disk_Y scale <0.8 0.8 1> translate <0 -1.6 0>}
  311.   texture {colour MediumForestGreen}
  312.   colour MediumForestGreen
  313. }
  314.  
  315. #declare Pants_3 = object
  316. { union
  317.   { intersection {Disk_Y scale <0.55 0.6 0.55> translate <0 -2.8 -0.4>}
  318.     intersection {Disk_Y scale <0.55 0.6 0.55> translate <0 -2.8  0.4>}
  319.   }
  320.   texture {colour Gray30}
  321.   colour Gray30
  322. }
  323.  
  324. #declare Legs_3 = object
  325. { union
  326.   { intersection {Disk_Y scale <0.3 0.6 0.3> translate <0 -3.8 -0.4>}
  327.     intersection {Disk_Y scale <0.3 0.6 0.3> translate <0 -3.8  0.4>}
  328.   }
  329.   texture {colour C533}
  330.   colour C533
  331. }
  332.  
  333. #declare Shoes_3 = object
  334. { union 
  335.   { quadric {Ellipsoid scale <0.8 0.5 0.5> translate <-0.2 -4.4 -0.4>}
  336.     quadric {Ellipsoid scale <0.8 0.5 0.5> translate <-0.2 -4.4  0.4>}
  337.   }
  338.   texture {colour Gray15}
  339.   colour Gray15
  340. }
  341.  
  342. #declare Sleeve_3 = object
  343. { union
  344.   { sphere {<0 0 0> 0.3}
  345.     intersection {Disk_Y scale <0.3 0.5 0.3> translate <0 -0.5 0>}
  346.   }
  347.   texture {colour MediumForestGreen}
  348.   colour MediumForestGreen
  349. }
  350.  
  351. #declare Hand_3 = object
  352. { union
  353.   { sphere {<0 -1.8 0> 0.3}
  354.     intersection {Disk_Y scale <0.2 1 0.2> translate <0 -1 0>}
  355.   }
  356.   texture {colour C533}
  357.   colour C533
  358. }
  359.  
  360. #declare Head_3 = composite
  361. { object {Skull_3}
  362.   object {Eye_2 translate <-0.8 0.3 0.3>}
  363.   object {Eye_2 translate <-0.8 0.3 -0.3>}
  364.   object {Cap rotate <0 0 -10>}
  365.   object {Peak_3 rotate <0 0 -10>}
  366.   bounded_by {sphere {<0 0 0> 1.6}}
  367. }
  368.  
  369. #declare Body_3 = composite
  370. { object {Torso_3}
  371.   object {Pants_3}
  372.   object {Legs_3}
  373.   object {Shoes_3}
  374. }
  375.  
  376. #declare Arm_3 = composite
  377. { object {Sleeve_3}
  378.   object {Hand_3}
  379. }
  380.  
  381. #declare Billy_Biggins = composite
  382. { composite {Head_3}
  383.   composite {Body_3}
  384.   composite {Arm_3 scale <.9 .9 .9> rotate <15 0 -100> translate <0 -1.2 -1.1>}
  385.   composite {Arm_3 scale <.9 .9 .9> rotate <-15 0 -0> translate <0 -1.2 1.1>}
  386. // move up so he stands on floor Z=0
  387.   translate <0 4.4 0>
  388.   bounded_by {box {<-2 0 -2> <2 5.5 2>}}
  389. }
  390.  
  391.  
  392. camera {
  393.    location  <-15 3 -22>
  394.    direction <0 0 4.8>
  395.    up        <0 1 0>
  396.    right     <1.25 0 0>
  397.    look_at   <0 1.3 0>
  398. }
  399.  
  400. object { light_source { <-50 100 -50> color White }}
  401. object { light_source { < 50 100 -50> color White }}
  402.  
  403. //Floor
  404. object
  405. { plane {<0 1 0> -1 }
  406.    texture { granite scale <0.3 0.3 0.3>}
  407.    colour Gray40
  408. }
  409.  
  410. //Platform
  411. object 
  412. { box {<-7 -1 -2><7 0 2>}
  413.   texture {colour Gray30}
  414.   colour Gray30
  415. }
  416.  
  417. //Platform Edge
  418. object
  419. { box {<-7 -0.2 -2.4><7 0.05 -1.6>}
  420.   texture {colour White}
  421.   colour White
  422. }
  423.  
  424. //Back fence
  425. object 
  426. { box {<-7 -1 2> <7 3 2.2>}
  427.   texture 
  428.   { gradient <1 0 0>
  429.     turbulence 0.1
  430.     colour_map
  431.     { [0 0.05 colour Gray50 colour Gray50]
  432.       [0.05 1 colour White colour White]
  433.     }
  434.   }
  435.   colour White
  436. }
  437.  
  438. // rails
  439. object
  440. { union
  441.   { box {<-7 -0.8 -2.6> <7 -0.7 -2.5>}
  442.     box {<-7 -0.8 -3.6> <7 -0.7 -3.5>}
  443.   }
  444.   texture {colour White}
  445.   colour White
  446. }
  447.  
  448. // sleepers
  449. object
  450. { union
  451.   { box {<-7 -1 -3.8><-6 -0.8 -2.3>}
  452.     box {<-5 -1 -3.8><-4 -0.8 -2.3>}
  453.     box {<-3 -1 -3.8><-2 -0.8 -2.3>}
  454.     box {<-1 -1 -3.8>< 0 -0.8 -2.3>}
  455.     box {< 1 -1 -3.8>< 2 -0.8 -2.3>}
  456.     box {< 3 -1 -3.8>< 4 -0.8 -2.3>}
  457.     box {< 5 -1 -3.8>< 6 -0.8 -2.3>}
  458.   }
  459.   texture {colour Black}
  460.   colour Black
  461. }
  462.  
  463.  
  464. composite {Mrs_Biggins
  465.            scale <0.5 0.5 0.5>
  466.            rotate <0 -10 0>
  467.            translate <3 0 0>
  468.           }
  469.  
  470. composite {Billy_Biggins
  471.            scale <0.3 0.3 0.3>
  472.            rotate <0 -100 0>
  473.            translate <1 0 0>
  474.           }
  475.  
  476. composite {Railway_Guard
  477.            scale <0.5 0.5 0.5>
  478.            rotate <0 0 0>
  479.            translate <-2.4 0 0>
  480.           }
  481.  
  482.