home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 9 / CD_ASCQ_09_1193.iso / news / 4444 / party1 / sword.inc < prev    next >
Text File  |  1992-07-22  |  6KB  |  224 lines

  1. //---- Trumans excellent Sword ........ 1312 AD
  2.  
  3.  
  4. #include "gold.inc"
  5.  
  6.  
  7. #declare QSphere =
  8.    quadric {
  9.       Sphere
  10.    }
  11.  
  12. #declare blade_texture =
  13.    texture {
  14.       metallic
  15.       color Gold
  16.       ambient 0.2
  17.       diffuse 0.8
  18.       phong 1.0
  19.       phong_size 100
  20.       roughness 0.000001
  21.       brilliance 2
  22.       reflection 0.2
  23.    }
  24.  
  25. #declare handle_texture =
  26.    texture {
  27.       color Sienna
  28.       ambient 0.15
  29.       diffuse 0.8
  30.       specular 1.0
  31.       roughness 0.000001
  32.       brilliance 2.0
  33.    }
  34.  
  35. #declare handle_ball_texture =
  36.    texture {
  37.       color      OldGold
  38.       ambient    0.2
  39.       diffuse    0.7
  40.       brilliance 1.5
  41.       specular   1.0
  42.       roughness  0.00000001
  43.       reflection 0.7
  44.    }
  45.  
  46. #declare hand_plate_texture =
  47.    texture {
  48.       handle_ball_texture
  49.    }
  50.  
  51. #declare grip_texture =
  52.    texture {
  53.       marble
  54.       turbulence 1.00
  55.       color_map {
  56.           [0.00 0.10 color red 0.42 green 0.26 blue 0.15
  57.                      color red 0.00 green 0.00 blue 0.00]
  58.           [0.10 0.90 color red 0.00 green 0.00 blue 0.00
  59.                      color red 0.52 green 0.37 blue 0.26]
  60.           [0.90 1.01 color red 0.52 green 0.37 blue 0.26
  61.                      color red 0.42 green 0.26 blue 0.15]
  62.       }
  63.       ambient 0.2
  64.       diffuse 0.7
  65.       phong 1.0
  66.       phong_size 50
  67.       scale <2 2 2>
  68.    }
  69.  
  70. #declare handle_ball =
  71.    object {
  72.      sphere { <0 0 0> 5 }
  73.    }
  74.  
  75. #declare blade =
  76.    object {
  77.       difference {
  78.          union {
  79.             intersection {
  80.                union {
  81.                   quadric {
  82.                      QSphere
  83.                      scale <105 4.5 1>
  84.                   }
  85.                   difference {
  86.                      quadric {
  87.                         QSphere
  88.                         scale <10 10 1>
  89.                      }
  90.                      quadric {
  91.                         QSphere
  92.                         scale <10 12 2>
  93.                         translate <-6 0 0>
  94.                      }
  95.                      translate <-10 0 0>
  96.                   }
  97.                }
  98.                plane { <0 0 -1> 0 rotate <-1.2 0 0> translate <0 0 -0.5> }
  99.                plane { <0 0 -1> 0 rotate < 1.2 0 0> translate <0 0 -0.5> }
  100.                plane { <0 0  1> 0 rotate < 1.2 0 0> translate <0 0 0.5> }
  101.                plane { <0 0  1> 0 rotate <-1.2 0 0> translate <0 0 0.5> }
  102.                plane { <1 0  0> 0 }
  103.             }
  104.          }
  105.          quadric {  // groove in blade : side 1
  106.             QSphere
  107.             scale <100 0.8 0.6>
  108.             translate <0 0 -0.65>
  109.          }
  110.          quadric {  // groove in blade : side 2
  111.             QSphere
  112.             scale <100 0.8 0.6>
  113.             translate <0 0 0.65>
  114.          }
  115.       }
  116.       bounded_by {
  117.          sphere { <-53 0 0> 54 }
  118.       }
  119.    }
  120.  
  121. #declare hand_plate =
  122.    object {
  123.       union {
  124.          union {
  125.             quadric { QSphere scale <2.0 6 6> }
  126.             quadric { QSphere scale <2.4 4 4> }
  127.             quadric { QSphere scale <2.6 2 2> }
  128.             translate <0 0 5>
  129.          }
  130.          union {
  131.             quadric { QSphere scale <2.0 6 6> }
  132.             quadric { QSphere scale <2.4 4 4> }
  133.             quadric { QSphere scale <2.6 2 2> }
  134.             translate <0 0 -5>
  135.          }
  136.       }
  137.       bounded_by {
  138.          sphere { <0 0 0> 22 }
  139.       }
  140.    }
  141.  
  142. #declare handle =
  143.    object {
  144.       intersection {
  145.          quadric {
  146.             QSphere
  147.             scale <19 3.3 1.5>
  148.             translate <18 0 0>
  149.          }
  150.          plane { <-1 0 0> -2 }
  151.       }
  152.       bounded_by {
  153.          sphere { <18 0 0> 20 }
  154.       }
  155.    }
  156.  
  157. #declare rubber_bump =
  158.    quadric {
  159.       QSphere
  160.       scale <1.5 2.5 1.92>
  161.       rotate <0 0 -20>
  162.    }
  163.  
  164. #declare grip =
  165.    object {
  166.       union { // rubber on grip
  167.          quadric { rubber_bump translate < 3 0 0> }
  168.          quadric { rubber_bump translate < 4 0 0> }
  169.          quadric { rubber_bump translate < 5 0 0> }
  170.          quadric { rubber_bump translate < 6 0 0> }
  171.          quadric { rubber_bump translate < 7 0 0> }
  172.          quadric { rubber_bump translate < 8 0 0> }
  173.          quadric { rubber_bump translate < 9 0 0> }
  174.          quadric { rubber_bump translate <10 0 0> }
  175.          quadric { rubber_bump translate <11 0 0> }
  176.          quadric { rubber_bump translate <12 0 0> }
  177.          quadric { rubber_bump translate <13 0 0> }
  178.          quadric { rubber_bump translate <14 0 0> }
  179.          quadric { rubber_bump translate <15 0 0> }
  180.          quadric { rubber_bump translate <16 0 0> }
  181.          quadric { rubber_bump translate <17 0 0> }
  182.          quadric { rubber_bump translate <18 0 0> }
  183.          quadric { rubber_bump translate <19 0 0> }
  184.          quadric { rubber_bump translate <20 0 0> }
  185.          quadric { rubber_bump translate <21 0 0> }
  186.          quadric { rubber_bump translate <22 0 0> }
  187.          quadric { rubber_bump translate <23 0 0> }
  188.          quadric { rubber_bump translate <24 0 0> }
  189.          quadric { rubber_bump translate <25 0 0> }
  190.          quadric { rubber_bump translate <26 0 0> }
  191.          quadric { rubber_bump translate <27 0 0> }
  192.          quadric { rubber_bump translate <28 0 0> }
  193.          quadric { rubber_bump translate <29 0 0> }
  194.          quadric { rubber_bump translate <30 0 0> }
  195.          quadric { rubber_bump translate <31 0 0> }
  196.          quadric { rubber_bump translate <32 0 0> }
  197.          quadric { rubber_bump translate <33 0 0> }
  198.          quadric { rubber_bump translate <34 0 0> }
  199.          quadric { rubber_bump translate <35 0 0> }
  200.          quadric { rubber_bump translate <36 0 0> }
  201.          quadric { rubber_bump translate <37 0 0> }
  202.          quadric { rubber_bump translate <38 0 0> }
  203.       }
  204.       bounded_by {
  205.          sphere { <18 0 0> 20 }
  206.       }
  207.    }
  208.  
  209. #declare sword =
  210.    composite {
  211.       object { handle_ball translate <38 0 0> texture { handle_ball_texture } }
  212.       object { blade                          texture { gold2   } }
  213.       object { grip                           texture { grip_texture        } }
  214.       object { handle                         texture { handle_texture      } }
  215.       object { hand_plate                     texture { hand_plate_texture  } }
  216.       bounded_by {
  217.          quadric {
  218.             QSphere
  219.             scale <150 20 20>
  220.          }
  221.       }
  222.       translate <45 0 0>
  223.    }
  224.