home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / povray / !POVscene / level3 / inc / drums < prev    next >
Encoding:
Text File  |  1992-07-22  |  6.3 KB  |  243 lines

  1. // Persistence Of Vision Raytracer version 1.0 sample file.
  2.  
  3. // Include file for DRUMS.POV by Dan Farmer
  4.  
  5. #declare Brass = colour red 0.88 green 0.84 blue 0.10
  6. #declare ChromeBlue = colour red 0.84 green 0.89 blue 1.00
  7.  
  8. #declare BrassTexture = texture {
  9.    reflection 0.15
  10.    brilliance 10.0
  11.    metallic
  12.    phong 0.75
  13.    phong_size 50
  14. }
  15.  
  16. #declare Chrome = texture { Mirror }
  17.  
  18. #declare VeryShiny = texture {
  19.    ambient 0.05  diffuse 0.75
  20.    phong 1.0
  21.    phong_size 100.0
  22.    brilliance 5
  23.    reflection 0.5
  24. }
  25.  
  26. #declare X_Tube = intersection {
  27.    quadric { Cylinder_X  }
  28.    quadric { Cylinder_X scale <0.97 0.97 0.97 > inverse  }
  29.    plane { <1.0 0.0 0.0> -1.0 inverse  }
  30.    plane { <1.0 0.0 0.0>  1.0  }
  31. }
  32.  
  33. #declare Cymbal = object {                          /* Overall radius of 6 units */
  34.    union {
  35.       quadric { Ellipsoid                             /* Dome */
  36.          scale <2.0 0.75 2.0 >
  37.          translate <0.0 1.0 0.0>
  38.       }
  39.       quadric { Ellipsoid 
  40.          scale <6.0 1.0 6.0 >
  41.       }
  42.    }       /* end union */
  43.    clipped_by {
  44.       plane { <0.0 1.0 0.0> 0.25 inverse  }
  45.    }       /* end clip */
  46.  
  47.    color Brass
  48.    texture {
  49.       BrassTexture
  50.       color Brass
  51.    }
  52.    bounded_by {
  53.       sphere { <0 0 0> 6.0  }
  54.    }
  55. }
  56.  
  57. #declare Tensioner1 =  union {
  58.    intersection {
  59.       Disk_X
  60.       translate <-0.5 0 0>     // old-style _Disk
  61.       scale <0.5 0.04 0.02>
  62.    }
  63.    intersection {
  64.       quadric { Ellipsoid scale <0.25 0.1 0.06>}
  65.       plane { <1 0 0> 0 }
  66.    }
  67. }
  68.  
  69. #declare Tensioner = object {
  70.    union {
  71.       union { Tensioner1 translate <0.5 0 0>}
  72.       union { Tensioner1 rotate <0 0 180> translate <-0.5 0 0> }
  73.    }
  74.    translate <0.0 0.0 1.03>      /* Position for rotation around drum cylinder */
  75.    color green 1.0
  76.    texture { Chrome
  77.       color ChromeBlue
  78.    }
  79. }
  80.  
  81.  
  82. #declare Drum = composite {            
  83.    object {                                       /* Top (and rear) Drumhead */
  84.       quadric { Ellipsoid  scale <0.001 1.0 1.0> }
  85.       translate <0.75 0.0 0.0>
  86.       color Blue
  87.       texture {
  88.          ambient 0.1
  89.          diffuse 0.7
  90.          specular 0.2
  91.          roughness 0.01
  92.          color White
  93.       }
  94.    }
  95.  
  96.  
  97.    object {                                       /* Chrome edge band #1 */
  98.       intersection { X_Tube}
  99.       scale <0.05 1.025 1.0>
  100.       translate <-0.8 0.0 0.0>
  101.       color Yellow
  102.       texture { Chrome
  103.          color ChromeBlue
  104.       }
  105.    }
  106.    object {                                       /* Drum body */
  107.       intersection {
  108.          quadric { Cylinder_X
  109.             texture {
  110.                VeryShiny
  111.                // color red 0.80 blue 0.10
  112.                color White
  113.             }
  114.          }
  115.          quadric { Cylinder_X                   /* Inside of the drum cylinder */
  116.             scale <0.97 0.97 0.97 > inverse
  117.             texture {
  118.                color Tan
  119.                ambient 0.05
  120.                diffuse 0.5
  121.             }
  122.          }
  123.          plane { <1.0 0.0 0.0> -1.0 inverse     /* Backside edge plane */
  124.             texture { Chrome
  125.                color ChromeBlue
  126.             }
  127.          }
  128.          plane { <1.0 0.0 0.0>  1.0             /* Front edge plane */
  129.             texture { Chrome
  130.                color ChromeBlue
  131.             }
  132.          }
  133.       }
  134.       scale <0.8 1.0 1.0>
  135.       color red 1.0
  136.    }
  137.  
  138.    object {                                       /* Chrome edge band #2 */
  139.       intersection { X_Tube  }
  140.       scale <0.05 1.025 1.0>
  141.       translate <+0.8 0.0 0.0>
  142.       color Magenta
  143.       texture { Chrome
  144.          color ChromeBlue
  145.       }
  146.    }
  147.  
  148.    /* Now a bunch of (10) tensioners */
  149.  
  150.    object { Tensioner rotate <000.0 0.0 0.0>  }
  151.    object { Tensioner rotate <036.0 0.0 0.0>  }
  152.    object { Tensioner rotate <072.0 0.0 0.0>  }
  153.    object { Tensioner rotate <108.0 0.0 0.0>  }
  154.    object { Tensioner rotate <144.0 0.0 0.0>  }
  155.    object { Tensioner rotate <180.0 0.0 0.0>  }
  156.    object { Tensioner rotate <216.0 0.0 0.0>  }
  157.    object { Tensioner rotate <252.0 0.0 0.0>  }
  158.    object { Tensioner rotate <288.0 0.0 0.0>  }
  159.    object { Tensioner rotate <324.0 0.0 0.0>  }
  160.  
  161.    bounded_by {
  162.       intersection {
  163.          quadric { Cylinder_X  scale <1.25 1.25 1.25>}
  164.          plane { <1.0 0.0 0.0> -1.25 inverse }
  165.          plane { <1.0 0.0 0.0>  1.25 }
  166.       }
  167.    }
  168.  
  169. }
  170.  
  171. #declare BassDrum = composite {
  172.    composite {Drum}
  173.    object {             /* Front Drumhead for Bass */
  174.       quadric { Ellipsoid  scale <0.001 1.0 1.0> }
  175.       translate <-0.75 0.0 0.0>
  176.       color Blue
  177.       texture {
  178.          ambient 0.2
  179.          diffuse 0.7
  180.          specular 0.5
  181.          roughness 0.05
  182.          color White alpha 0.25
  183.       }
  184.    }
  185.    scale <8.0 10.0 10.0>
  186. }
  187.  
  188. /********************** not used at this time
  189. DECLARE SnareDrum = COMPOSITE Drum
  190.     ROTATE <0.0 0.0 90.0>
  191.     SCALE <5.0 4.0 5.0>
  192. END_COMPOSITE
  193. ***********************/
  194.  
  195. #declare TomTom = composite { Drum
  196.    rotate <0.0 0.0 90.0>
  197.    scale <5.0  5.0 5.0>
  198. }
  199.  
  200. /* Combine a base and a pair of tomtoms into a half-set */
  201. /* Object is still centered at 0,0 at this point */
  202. #declare HalfSet = composite {
  203.  
  204.    composite { BassDrum      /* Right bass SCALE <8.0 10.0 10.0> */
  205.       rotate <0.0 -90.0 0.0>                   /* Turn it on its end */
  206.    }
  207.  
  208.    composite { TomTom  /* SCALE <5.0  5.0 5.0> */
  209.       rotate <+30.0 0.0 0.0>                   /* Lean it towards drummer */
  210.       translate <0.0 16.0 0.0>                 /* Raise it up */
  211.       translate <-7.0 0.0 0.0>                 /* Move it left */
  212.    }
  213.  
  214.    composite { TomTom  /* SCALE <5.0  5.0 5.0> */
  215.       rotate <+30.0 0.0 0.0>                   /* Lean it towards drummer */
  216.       translate <0.0 16.0 0.0>                 /* Raise it up */
  217.       translate <+7.0 0.0 0.0>                 /* Move it right */
  218.    }
  219.  
  220.    object {          /* tomtom bracket */
  221.       union {
  222.          intersection { Disk_X                  /* Horizontal bar */
  223.             translate <-0.5 0 0>
  224.             scale <4 0.25 0.25>            /* Fits between tomtoms */
  225.             translate <0.0 16.0 0.0 >       /* Raise to top of vertical bar*/
  226.          }
  227.  
  228.          quadric { Ellipsoid translate <-4 16 0> scale <0.5 1 1> }
  229.          quadric { Ellipsoid translate < 4 16 0> scale <0.5 1 1> }
  230.  
  231.          intersection { Disk_Y                  /* Vertical bar */
  232.             scale <0.30 6.0 0.30>
  233.             translate <0.0 10.0 0.0 >
  234.          }
  235.          quadric { Ellipsoid scale <1.25 0.5 1.25> translate <0 10 0>}
  236.       }
  237.       color Cyan
  238.       texture { Mirror
  239.          color White
  240.       }
  241.    }
  242. }
  243.