home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / slug1 / tower.inc < prev   
Text File  |  1992-12-28  |  10KB  |  361 lines

  1. //--- Ancient Towers
  2.  
  3. //--- Torus For Dome Base
  4. #declare T20 = 
  5.    quartic {
  6.    <    1.000000 0.000000 0.000000 0.000000 2.000000
  7.         0.000000 0.000000 2.000000 0.000000 -50.320000
  8.         0.000000 0.000000 0.000000 0.000000 0.000000
  9.         0.000000 0.000000 0.000000 0.000000 0.000000
  10.         1.000000 0.000000 0.000000 2.000000 0.000000
  11.         49.680000 0.000000 0.000000 0.000000 0.000000
  12.         1.000000 0.000000 -50.320000 0.000000 617.025600 >
  13. sturm
  14.    }
  15.  
  16.  
  17. //--- Hersey Kiss Shape
  18. #declare Piriform =
  19. quartic {
  20.    < 4.0   0.0   0.0   -4.0  0.0   0.0   0.0   0.0   0.0  0.0
  21.    0.0   0.0   0.0    0.0  0.0   0.0   0.0   0.0   0.0  0.0
  22.    0.0   0.0   0.0    0.0  0.0   1.0   0.0   0.0   0.0  0.0
  23.    0.0   0.0   1.0    0.0  0.0 >
  24. }
  25.  
  26. //--- Bright Metallic Gold
  27. #declare Gold2 = 
  28. texture {  
  29.     0.02  
  30.     ambient 0.3 
  31.     diffuse 0.5 
  32.     colour red 0.64 green 0.51 blue 0.05
  33.     reflection 0.6 
  34.     brilliance 8 
  35.     specular 0.5 
  36. }
  37.  
  38.  
  39.  
  40. #declare DomeTexture =
  41. texture {
  42.   gradient <0 1 0> 
  43.    color_map {
  44.    [0 1  color Gold color Gray60]
  45.    }
  46.   scale <2 2 2>
  47.   turbulence .3
  48.   ambient .1
  49.   phong 1
  50.   .1
  51. }
  52.  
  53. #declare FrameTexture =
  54. texture {
  55.   color Feldspar 
  56.   ambient .1
  57.   phong 1
  58.   .15
  59. }
  60.  
  61. #declare Muck = color red .76 green .74 blue .67
  62.  
  63. #declare Body2Texture =
  64. texture {
  65.   color Muck  
  66.   ambient .1
  67.   phong 1
  68.   .15
  69. }
  70.  
  71.  
  72. #declare BodyTexture =
  73. texture {
  74.   color Gray50
  75.   ambient .1
  76.   phong 1
  77.   .15
  78. }
  79.  
  80.  
  81.  
  82. //--- Kiss shaped Object
  83. #declare Kiss =
  84. object {
  85.   quartic { Piriform rotate <0 0 -90> }
  86.    texture { DomeTexture }
  87.      bounded_by {
  88.      box { UnitBox scale <.66 .6 .66> translate <0 -.55 0> }
  89.      }
  90. }
  91.  
  92. //--- Kiss shape for Rib
  93. #declare RKiss =
  94.   quartic { Piriform rotate <0 0 -90> }
  95.  
  96.  
  97. //--- Dome Ribs
  98. #declare DRib =
  99. object {
  100.   intersection { 
  101.    quartic { RKiss scale <11 11 11> } 
  102.    plane { <0 0 1> .3 }
  103.    plane { <0 0 1> -.3 inverse }
  104.   }
  105.    texture { Gold2 }
  106.      bounded_by {
  107.      box { UnitBox scale <7 6 3> translate <0 -5.5 0> }
  108.      }
  109. }
  110.  
  111.  
  112.  
  113.  
  114. //---- Tower Type1
  115. #declare Tower1 =
  116. composite {
  117.    //--- Dome
  118.    composite {
  119.     object { Kiss scale <10 10 10> translate <0 10 0> }
  120.     object { Kiss scale <2.9 2.9 2.9> translate <0 10.7 0> texture { Gold2 }}
  121.     object { Kiss scale <1.07 6 1.07> translate <0 14.3 0> texture { Gold2 }}
  122.     object { DRib rotate <0 0 0> translate <0 10.5 0> }
  123.     object { DRib rotate <0 60 0> translate <0 10.5 0> }
  124.     object { DRib rotate <0 120 0> translate <0 10.5 0> }
  125.       bounded_by {
  126.       box { UnitBox scale <7 7.5 7> translate <0 7.3 0> }
  127.       }
  128.     translate <0 42 0>
  129.     }
  130.     
  131.     //--- Torus Base
  132.     object {
  133.      quartic { T20 }
  134.       texture { Gold2 }
  135.         bounded_by {
  136.         box { UnitBox scale <5.5 .5 5.5> }
  137.         }
  138.     translate <0 42 0> 
  139.     }
  140.    
  141.     //--- Tower Body
  142.     object {
  143.      difference {
  144.       intersection { Disk_Y scale <5 21 5> translate <0 21 0> }
  145.       quadric { Cylinder_Y scale <4 1 4> }
  146.       quadric { Cylinder_Z scale <3 3 1> translate <0 35.2 0> }
  147.       box { UnitBox scale <1.8 3.4 6> translate <0 33.2 0> }
  148.      }
  149.       texture { BodyTexture }
  150.         bounded_by {
  151.         box { UnitBox scale <5.5 22 5.5> translate <0 21 0> }
  152.         }
  153.     } 
  154.  
  155.     //--- Tower Window
  156.     object {
  157.      difference {
  158.       union {
  159.       quadric { Cylinder_Z scale <3.8 3.8 1> translate <0 35.2 0> }
  160.       box { UnitBox scale <2.6 4.2 6> translate <0 33.2 0> }
  161.       }
  162.       quadric { Cylinder_Z scale <3 3 1> translate <0 35.2 0> }
  163.       box { UnitBox scale <1.8 3.4 6> translate <0 33.2 0> }
  164.       quadric { Cylinder_Y scale <5.5 1 5.5> inverse }
  165.      }
  166.       texture { FrameTexture }
  167.         bounded_by {
  168.         box { UnitBox scale <4.2 6 6> translate <0 33.9 0> }
  169.         }
  170.    }   
  171.  
  172.    object { 
  173.     union {
  174.       intersection { Disk_Y scale <5.5 1 5.5> translate <0 40.6 0> }
  175.       intersection { Disk_Y scale <5.5 13 5.5> translate <0 13 0> }
  176.     }
  177.        texture { FrameTexture }
  178.    }
  179.         bounded_by {
  180.         box { UnitBox scale <7 30 7> translate <0 29 0> }
  181.         }
  182. }
  183.  
  184.  
  185. //---- Tower Type2
  186. #declare Tower2 =
  187. composite {
  188.    //--- Dome
  189.    composite {
  190.     object { Kiss scale <10 10 10> translate <0 10 0> texture { BodyTexture } }
  191.     object { Kiss scale <2.9 2.9 2.9> translate <0 10.7 0> texture { Gold2 }}
  192.     object { Kiss scale <1.07 6 1.07> translate <0 14.3 0> texture { Gold2 }}
  193.     object { DRib rotate <0 0 0> translate <0 10.5 0> }
  194.     object { DRib rotate <0 60 0> translate <0 10.5 0> }
  195.     object { DRib rotate <0 120 0> translate <0 10.5 0> }
  196.       bounded_by {
  197.       box { UnitBox scale <7 7.5 7> translate <0 7.3 0> }
  198.       }
  199.     translate <0 42 0>
  200.     }
  201.     
  202.     //--- Torus Base
  203.     object {
  204.      quartic { T20 }
  205.       texture { Gold2 }
  206.         bounded_by {
  207.         box { UnitBox scale <5.5 .5 5.5> }
  208.         }
  209.     translate <0 42 0> 
  210.     }
  211.    
  212.     //--- Tower Body
  213.     object {
  214.      difference {
  215.       intersection { Disk_Y scale <5 21 5> translate <0 21 0> }
  216.       quadric { Cylinder_Y scale <4 1 4> }
  217.       quadric { Cylinder_Z scale <3 3 1> translate <0 35.2 0> }
  218.       box { UnitBox scale <1.8 3.4 6> translate <0 33.2 0> }
  219.      }
  220.       texture { BodyTexture }
  221.         bounded_by {
  222.         box { UnitBox scale <5.5 22 5.5> translate <0 21 0> }
  223.         }
  224.     } 
  225.  
  226.     //--- Tower Window
  227.     object {
  228.      difference {
  229.       union {
  230.       quadric { Cylinder_Z scale <3.8 3.8 1> translate <0 35.2 0> }
  231.       box { UnitBox scale <2.6 4.2 6> translate <0 33.2 0> }
  232.       }
  233.       quadric { Cylinder_Z scale <3 3 1> translate <0 35.2 0> }
  234.       box { UnitBox scale <1.8 3.4 6> translate <0 33.2 0> }
  235.       quadric { Cylinder_Y scale <5.5 1 5.5> inverse }
  236.      }
  237.       texture { Body2Texture }
  238.         bounded_by {
  239.         box { UnitBox scale <4.2 6 6> translate <0 33.9 0> }
  240.         }
  241.    }   
  242.  
  243.    object { 
  244.     union {
  245.       intersection { Disk_Y scale <5.5 1 5.5> translate <0 40.6 0> }
  246.       intersection { Disk_Y scale <5.5 13 5.5> translate <0 13 0> }
  247.     }
  248.        texture { Body2Texture }
  249.    }
  250.         bounded_by {
  251.         box { UnitBox scale <7 30 7> translate <0 29 0> }
  252.         }
  253. }
  254.  
  255. //--- Post for Bridge
  256. #declare Post1 = intersection { Disk_Y scale <.2 1.8 .2> }
  257.  
  258.  
  259.  
  260. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
  261.  
  262. //--- Complete Tower 
  263. composite {
  264.   composite {
  265.   composite { Tower1 translate <-22 0 0> }
  266.   composite { Tower1 translate <22 0 0> }
  267.   composite { Tower1 scale <3 2 3> translate <0 -61 0> }
  268.   composite { Tower2 scale <1.6 1.6 1.6> translate <14.3 0 23> }
  269.         bounded_by {
  270.         box { UnitBox scale <33 50 30> translate <0 49 7.7> }
  271.         }
  272.   }
  273.  
  274.   composite {
  275.   composite { Tower1 scale <1 1 1> translate <64.6 0 0> }
  276.   composite { Tower2 scale <1.6 1.6 1.6> translate <75 0 23.1> }
  277.   composite { Tower2 scale <1.6 1.6 1.6> translate <75 -49.5 -9.1> }
  278.         bounded_by {
  279.         box { UnitBox scale <19 50 30> translate <72.5 49 7.7> }
  280.         }
  281.   }
  282.  
  283.  
  284.  //--- Bridge Span
  285.  composite {
  286.   composite {
  287.   //--- Bridge Trim
  288.   object {
  289.    union {
  290.     difference {
  291.      intersection { Disk_Z scale <12 12 2> translate <0 -14 0> }
  292.      quadric { Cylinder_Z scale <11 11 1> translate <0 -14 0> }
  293.      plane { <0 1 0> -14 }
  294.     }
  295.      box { UnitBox scale <16.5 .6 2> translate <0 -.6 0> }
  296.      box { UnitBox scale <1.9 1.1 2> translate <-14.7 -15 0> }
  297.      box { UnitBox scale <1.9 1.1 2> translate <14.7 -15 0> }
  298.    }
  299.      texture { FrameTexture }
  300.         bounded_by {
  301.         box { UnitBox scale <17.5 9 3> translate <0 -8 0> }
  302.         }
  303.   }
  304.  
  305.   //--- Bridge Wall
  306.   object {
  307.    difference {
  308.     box { UnitBox scale <16.5 6.45 1.6> translate <0 -7.6 0> }
  309.     quadric { Cylinder_Z scale <12 12 1> translate <0 -14 0> }
  310.    }
  311.      texture { BodyTexture }
  312.         bounded_by {
  313.         box { UnitBox scale <17.5 9 3> translate <0 -8 0> }
  314.         }
  315.  }
  316.         bounded_by {
  317.         box { UnitBox scale <17.5 9 3> translate <0 -8 0> }
  318.         }
  319.  }
  320.   object {
  321.     union {
  322.     intersection { Post1 translate <-15 1.8 0> }
  323.     intersection { Post1 translate <-13.5 1.8 0> }
  324.     intersection { Post1 translate <-12 1.8 0> }
  325.     intersection { Post1 translate <-10.5 1.8 0> }
  326.     intersection { Post1 translate <-9 1.8 0> }
  327.     intersection { Post1 translate <-7.5 1.8 0> }
  328.     intersection { Post1 translate <-6 1.8 0> }
  329.     intersection { Post1 translate <-4.5 1.8 0> }
  330.     intersection { Post1 translate <-3 1.8 0> }
  331.     intersection { Post1 translate <-1.5 1.8 0> }
  332.     intersection { Post1 translate <0 1.8 0> }
  333.     intersection { Post1 translate <15 1.8 0> }
  334.     intersection { Post1 translate <13.5 1.8 0> }
  335.     intersection { Post1 translate <12 1.8 0> }
  336.     intersection { Post1 translate <10.5 1.8 0> }
  337.     intersection { Post1 translate <9 1.8 0> }
  338.     intersection { Post1 translate <7.5 1.8 0> }
  339.     intersection { Post1 translate <6 1.8 0> }
  340.     intersection { Post1 translate <4.5 1.8 0> }
  341.     intersection { Post1 translate <3 1.8 0> }
  342.     intersection { Post1 translate <1.5 1.8 0> }
  343.    }
  344.      texture { Gold2 }
  345.         bounded_by {
  346.         box { UnitBox scale <16 2.3 .5> translate <0 1.7 0> }
  347.         }
  348.   }
  349.   translate <43.6 30.6 0>  
  350.  }
  351.         bounded_by {
  352.         box { UnitBox scale <65 50 30> translate <28.8 49 7.7> }
  353.         }
  354.  
  355. scale <16.6666 16.6666 16.6666>
  356. translate <290 1040 1100>
  357.  
  358. }
  359.  
  360.  
  361.