home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / scripts / pov / st3 / platform.inc < prev    next >
Encoding:
Text File  |  1993-04-17  |  13.5 KB  |  528 lines

  1. //----- Station Platform
  2.  
  3.  
  4.  
  5.  
  6. #declare BaseTexture =
  7.    texture { st6 scale <11 5 5> ambient 0.2 diffuse 0.8 }
  8.    texture { st7 scale <10 11 6> rotate <0 0 -40> phong 1.0 }
  9.  
  10.  
  11.  
  12. //----- Lower Wall
  13. #declare lower_wall = 
  14. composite {
  15.  //---- Wall Base
  16.  object {
  17.    union {
  18.      intersection { Cube scale <24 3 6> translate <0 3 0> }
  19.      intersection { Cube scale <10 3 16> translate <0 3 0> }
  20.      intersection { Cube scale <23 5 5> translate <0 11 0> }
  21.      intersection { Cube scale <9 5 15> translate <0 11 0> }
  22.      intersection { Y_Disk scale <8.5 4 8.5> translate <0 16 -6> }
  23.    }
  24.     texture { st6 scale <15 4 3> ambient 0.2 diffuse 0.8 }
  25.     texture { st7 scale <20 12 5> rotate <0 0 -40> phong 1.0 }
  26.         bounded_by {
  27.         intersection { Cube scale <25 11 17> translate <0 12 0> }
  28.         }
  29.  }
  30.  //---- Wall Base
  31.  object {
  32.    union {
  33.      intersection { Cube scale <24 3 6> translate <0 3 0> }
  34.      intersection { Cube scale <10 3 16> translate <0 3 0> }
  35.      intersection { Cube scale <23 5 5> translate <0 11 0> }
  36.      intersection { Cube scale <9 5 15> translate <0 11 0> }
  37.      intersection { Y_Disk scale <8.5 4 8.5> translate <0 16 -6> }
  38.    }
  39.     texture { st6 scale <7 4 3> ambient 0.2 diffuse 0.8 }
  40.     texture { st7 scale <10 6 5> rotate <0 0 -40> phong 1.0 }
  41.         bounded_by {
  42.         intersection { Cube scale <25 11 17> translate <0 12 0> }
  43.         }
  44.  scale <1 0.5 1> rotate <0 0 180> translate <0 100 0>
  45.  }
  46.  
  47.  //---- Ionic Capital
  48.  composite {
  49.     object { 
  50.       union { //----------capital belly
  51.         intersection { Y_Disk scale <8.5 2 8.5> translate <0 0 0> }
  52.         intersection { Y_Disk scale <9 12 9> translate <0 2 0> }
  53.         intersection { Z_Disk scale <4.5 4.8 12> translate <-8.5 9.3 -10> }
  54.         intersection { Z_Disk scale <4.5 4.8 12> translate <8.5 9.3 -10> }
  55.         quadric { Sphere scale <11 1 11> translate <0 8 0> }
  56.       }
  57.       texture { stone4 }
  58.         bounded_by { 
  59.         intersection { Y_Disk scale <17 15 17> translate <0 -0.5 -2> } 
  60.         }
  61.     }
  62.  
  63.     composite { turn16 rotate <90 0 0> rotate <0 0 90> translate <-8 9 -9> }
  64.     composite { turn16 rotate <90 0 0> rotate <0 0 90> rotate <0 180 0> translate <8 9 -9> }
  65.  
  66.     object { 
  67.       intersection { X_Disk scale <16 0.5 3> translate <-8 13.5 -9> }
  68.         texture { stone4 }
  69.     }
  70.         bounded_by { 
  71.         intersection { Y_Disk scale <22 16 22> translate <0 -1 -2> } 
  72.         }
  73.  translate <0 78 -6>
  74.  }
  75.  
  76.  //--- Column
  77.  object {
  78.    intersection { Y_Disk scale <8 58 8> }
  79.       texture { st3 scale <6 10 1> diffuse 0.5 }
  80.       texture { st2 scale <15 20 3> ambient 0.2 rotate <0 0 35> phong 1.0 phong_size 50 }
  81.    translate <0 20 -6> 
  82.  }
  83.  
  84.  //--- Wall
  85.  object {
  86.    intersection { Cube scale <22 39 4> }
  87.     texture { GreenStone2 scale <3 2 3> }
  88.  translate <0 54 0> 
  89.  }
  90.  
  91.         bounded_by {
  92.         intersection { Cube scale <25 55 18> translate <0 54 0> }
  93.         }
  94. }
  95.  
  96.  
  97.  
  98. //--- Large Arch Molding
  99. #declare l_arch = 
  100. object {
  101.    difference {
  102.      quadric { Cylinder_Z scale <40 40 1> }
  103.      quadric { Cylinder_Z scale <33 33 1> }
  104.      plane { <0 0 -1> 5 inverse } 
  105.      plane { <0 0 -1> -5 }
  106.      plane { <-1 0 0> 0 }
  107.    }
  108.        texture { st6 scale <10 4 5> ambient 0.2 diffuse 0.7 }
  109.        texture { st7 scale <10 7 5> rotate <0 0 -40> phong 1.0 }
  110.       bounded_by { 
  111.       intersection { Cube scale <24 24 12> translate <-19 22 0> } 
  112.       }
  113. }
  114.  
  115.  
  116. //--- Apex molding
  117. #declare apex = 
  118. object {
  119.    difference {
  120.      union {
  121.        quadric { Cylinder_Z scale <9.375 9.375 1> translate <-5 0 0> }
  122.        quadric { Cylinder_Z scale <9.375 9.375 1> translate <5 0 0> }
  123.      }
  124.      quadric { Cylinder_Z scale <5 5  1> translate <-5 0 0> }
  125.      quadric { Cylinder_Z scale <5 5 1> translate <5 0 0> }
  126.      plane { <0 0 -1> 5 inverse }
  127.      plane { <0 0 -1> -5 }
  128.      plane { <-1 0 0> -5 }
  129.      plane { <1 0 0> -5 }
  130.   }
  131.        texture { stone4 }
  132.     bounded_by { 
  133.     intersection { Cube scale <12 12 12> translate <0 0 0> } 
  134.     }
  135. }
  136.  
  137.  
  138. //---- Small Arch molding
  139. #declare s_arch = object { l_arch scale <0.625 0.625 0.9> }
  140.  
  141. #declare wedge_key = 
  142. object { 
  143.    union {
  144.      intersection {
  145.        plane { <0 0 1> 1.0 }
  146.        plane { <0 0 -1> 1.0 }
  147.        plane { <0 1 0> 1.0 }
  148.        plane { <0 -1 0> 1.0 }
  149.        plane { <1 0 0> 1.0   rotate <0 0 -20> }
  150.        plane { <-1 0 0> 1.0  rotate <0 0 20> }
  151.      scale <10 11 14> translate <0 0 2> 
  152.      }
  153.  
  154.      intersection {
  155.        plane { <0 0 1> 1.0 }
  156.        plane { <0 0 -1> 1.0 }
  157.        plane { <0 1 0> 1.0 }
  158.        plane { <0 -1 0> 1.0 }
  159.        plane { <1 0 0> 1.0   rotate <0 0 -20> }
  160.        plane { <-1 0 0> 1.0  rotate <0 0 20> }
  161.      scale <20 7.5 12> translate <0 -2 2>
  162.      }
  163.    }
  164.     texture { st6 scale <5 4 3> ambient 0.2 diffuse 0.8 }
  165.     texture { st7 scale <7 3 5> rotate <0 0 -40> phong 1.0 }
  166. scale <0.4 0.75 0.5> 
  167. }
  168.  
  169.  
  170. //---- Station Wall
  171. #declare st_w = 
  172. composite {
  173.  
  174.     //--- Station Roof
  175.     object {
  176.      union {
  177.       intersection { Cube scale <72 3 200> translate <0 168 185> }
  178.       intersection { Cube scale <68 5 200> translate <0 175 185> }
  179.       }
  180.         texture { GrayStone2 }
  181.     }
  182.  
  183.     composite { lower_wall translate <-47 0 0> }
  184.     composite { lower_wall translate <47 0 0> }
  185.     object { l_arch translate <-5 102 -10> }
  186.     object { s_arch translate <-5 100 2> }
  187.     object { l_arch rotate <0 180 0> translate <5 102 -10> }
  188.     object { s_arch rotate <0 180 0> translate <5 100 2> }
  189.  
  190.     //---- Upper wall
  191.     object {
  192.       union {
  193.         difference {
  194.           intersection { Cube scale <55 55 4.5> translate <0 55 -4.5> }
  195.           quadric { Cylinder_Z scale <42 40 1> }
  196.         }
  197.         difference {
  198.           intersection { Cube scale <68 35 4.5> translate <0 35 4.5> }
  199.           quadric { Cylinder_Z scale <28 25 1> }
  200.         }
  201.       }
  202.         texture { GreenStone1 scale <3 2 3> }
  203.  
  204.  
  205.            bounded_by {
  206.            intersection { Cube scale <70 55 10> translate <0 50 0> }
  207.            }
  208.     translate <0 100 0>
  209.     }
  210.  
  211.     object { wedge_key translate <0 140 -11> }
  212.     object { wedge_key scale <0.8 0.8 0.8> translate <0 125 -4> }
  213.  
  214.         bounded_by {
  215.         intersection { Cube scale <95 93 18> translate <0 90 0> }
  216.         }
  217. }
  218.  
  219.  
  220.  
  221.  
  222. //--- Combine Two Walls
  223. #declare station_wall = 
  224. composite {
  225.   composite { st_w }
  226.   composite { st_w translate <136 0 0> }
  227. }
  228.  
  229.  
  230.  
  231. //---- Corner Post
  232. #declare fat_post = 
  233. object {
  234.    union {
  235.      intersection { Cube scale <30 60 30> translate <0 0 0> }
  236.      intersection { Cube scale <35 10 35> translate <0 -50 0> }
  237.      intersection { Cube scale <35 10 35> translate <0 42 0> }
  238.    }
  239.     texture { st6 scale <15 9 9> ambient 0.2 diffuse 0.8 }
  240.     texture { st7 scale <10 14 7> rotate <0 0 -40> phong 1.0 }
  241.       bounded_by { 
  242.       intersection { Cube scale <40 70 40 > translate <0 0 0> }
  243.       }
  244. }
  245.  
  246. //--- Vase
  247. #declare vase = 
  248. object {
  249. union {
  250.   intersection {
  251.     difference {
  252.     union {
  253.       quadric { Sphere scale <12 20 22> }
  254.       quadric { Sphere scale <12 20 22> rotate <0 45 0> }
  255.       quadric { Sphere scale <12 20 22> rotate <0 90 0> }
  256.       quadric { Sphere scale <12 20 22> rotate <0 135 0> }
  257.         }
  258.     plane { <0 -1 0> 0.2 }
  259.      }
  260.    }
  261.  
  262.    union {
  263.      quadric { Sphere scale <13 5 13> translate <0 0 0> }
  264.      quadric { Sphere scale <6 10 6>  translate <0 6 0> }
  265.    }
  266.   }
  267.     texture { st3 scale <13 8 6> diffuse 0.5 }
  268.     texture { st2 scale <10 10 6> ambient 0.2 rotate <0 0 35> phong 1.0 phong_size 50 }
  269.       bounded_by { 
  270.       intersection { Cube scale <30 30 30 >}
  271.       }
  272.   
  273.   scale <1.5 1.5 1.5>
  274. }
  275.  
  276. #declare tred = intersection { Cube scale <35 5 210> }
  277. #declare riser = intersection { Cube scale <5 15 210> }
  278.  
  279. //--- Steps, Step Walls & Corner Posts
  280. composite {
  281.  //---- Stair Wall
  282.  object {
  283.   union {
  284.     difference {
  285.       intersection { Cube scale <120 75 35> }
  286.       plane { <0 1 0> 0 rotate <0 0 32.5> translate <0 22.5 0> inverse }
  287.     }
  288.     difference {
  289.       intersection { Cube scale <120 105 20> translate <0 50 0> }
  290.       plane { <0 1 0> 0 rotate <0 0 32.5> translate <0 80 0> inverse }
  291.     }
  292.   }
  293.     texture { GrayStone3 scale <.5 .5 .5> }
  294.        bounded_by {
  295.        intersection { Cube scale <130 120 40> translate <0 45 0> }
  296.        }
  297.  translate <0 0 -240>
  298.  }
  299.  
  300.  //---- Stair Wall
  301.  object {
  302.   union {
  303.     difference {
  304.       intersection { Cube scale <120 75 35> }
  305.       plane { <0 1 0> 0 rotate <0 0 32.5> translate <0 22.5 0> inverse }
  306.     }
  307.     difference {
  308.       intersection { Cube scale <120 105 20> translate <0 50 0> }
  309.       plane { <0 1 0> 0 rotate <0 0 32.5> translate <0 80 0> inverse }
  310.     }
  311.   }
  312.     texture { GrayStone3 scale <.5 .5 .5> }
  313.        bounded_by {
  314.        intersection { Cube scale <130 120 40> translate <0 45 0> }
  315.        }
  316.  translate <0 0 240>
  317.  }
  318.  
  319.  //---Top Face
  320.  object {
  321.      intersection { Cube scale <135 6 35> rotate <0 0 32.5> translate <0 77 0> }  
  322.     texture { st6 scale <15 10 18>  rotate <0 30 0> }
  323.     texture { st7 scale <10 16 16> rotate <0 0 40> ambient .1 diffuse .5 phong .2 phong_size 200 }
  324.  translate <0 0 240> 
  325.  }
  326.  
  327.  //---Top Face
  328.  object {
  329.      intersection { Cube scale <135 6 35> rotate <0 0 32.5> translate <0 77 0> }  
  330.     texture { st6 scale <15 12 16> rotate <20 0 0>}
  331.     texture { st7 scale <13 17 18> rotate <0 0 -10> ambient .1 diffuse .5 phong .2 phong_size 200 }
  332.  translate <0 0 -240> 
  333.  }
  334.  
  335.  //---- Steps
  336.  object {
  337.    union {
  338.      intersection { riser translate <-65 -60 0> }
  339.      intersection { tred translate <-45 -40 0> }
  340.      intersection { riser translate <-5 -30 0> }
  341.      intersection { tred translate <15 -10 0> }
  342.      intersection { riser translate <55 0 0> }
  343.      intersection { tred translate <75 20 0> }
  344.    }
  345.       texture { st3 scale <18 14 15> diffuse 0.5 rotate <0 0 40>}
  346.       texture { st2 scale <15 9 23> 
  347.     ambient 0.2 
  348.     rotate <0 0 15> 
  349.     phong .7 
  350.     phong_size 60     
  351.     reflection .3
  352.       }
  353.       bounded_by { 
  354.       intersection { Cube scale <110 60 240> translate <15 -25 0> }
  355.       }
  356.  }
  357.  
  358.  object { fat_post translate <140 115 240> }
  359.  object { fat_post translate <140 115 -240> }
  360.     bounded_by { 
  361.     intersection { Cube scale <160 140 290> translate <30 55 0> }
  362.     }
  363.  
  364. rotate <0 -90 0> translate <300 -50 -610>
  365. }
  366.  
  367.  
  368.  
  369. //---- Marble Floor
  370. object {
  371.    intersection { Cube scale <1470 1510 5> }
  372.      texture { 
  373.     tiles { 
  374.       texture { t1 } 
  375.       tile2
  376.       texture { t2  } 
  377.         }
  378.       scale <50 50 2> 
  379.      }
  380.      texture { 
  381.     checker 
  382.     color DimGray 
  383.     alpha 0.2 
  384.     color DimGray 
  385.     alpha 0.5
  386.     scale <105 107.8 2> 
  387.     phong 1.0 
  388.     ambient .1
  389.     reflection 0.3     
  390.       }
  391.   rotate <90 0 0> translate <1000 0 1000> 
  392. }
  393.  
  394.  
  395.  
  396. //---- Floor Base
  397. object {
  398.   intersection { Cube scale <1450 200 1490> translate <1000 -200 1000> }
  399.      texture { st3 scale <30 20 20> diffuse 0.5 }
  400.      texture { st2 scale <50 30 30> ambient 0.2 rotate <0 0 35> }
  401.      texture { color DimGray alpha 0.4 phong 1.0 phong_size 50 }
  402. }
  403.  
  404. //---- Floor Trim
  405. object {
  406.   intersection { Cube scale <1460 20 20> translate <1000 -25 -488> }
  407.      texture { st3 scale <19 20 20> diffuse 0.5 }
  408.      texture { st2 scale <30 25 20> ambient 0.2 rotate <0 0 35> phong 1.0 phong_size 50 }
  409. }
  410.  
  411.  
  412.  
  413. //--- Cross section of railing
  414. #declare cross = 
  415. object {
  416.    union {
  417.      quadric { Cylinder_Y scale <2.5 80 2.5> translate <0 -40 0> rotate <0 0 45> }
  418.      quadric { Cylinder_Y scale <2.5 80 2.5> translate <0 -40 0> rotate <0 0 -45> }
  419.      quadric { Cylinder_Y scale <2.5 50 2.5> translate <25 -25 0> rotate <0 0 0> }
  420.      quadric { Cylinder_Y scale <2.5 50 2.5> translate <-25 -25 0> rotate <0 0 0> }
  421.    }
  422.     texture { Gold2 }
  423.       clipped_by { intersection { Cube scale <30 25 3> } }
  424.       bounded_by { intersection { Cube scale <30 25 3> } }
  425. }
  426.  
  427.  
  428. #declare hor_rail = 
  429. object {
  430.   quadric { Cylinder_X scale <480 3 4> translate <-240 0 0> }
  431.   texture { Gold2 }
  432. }
  433.  
  434.  
  435. #declare cross_rail = 
  436. composite {
  437.     object { cross translate <-175 0 0> }
  438.     object { cross translate <-105 0 0> }
  439.     object { cross translate <-35 0 0> }
  440.     object { cross translate <35 0 0> }
  441.     object { cross translate <105 0 0> }
  442.     object { cross translate <175 0 0> }
  443.     object { hor_rail translate <0 25 0> }
  444.     object { hor_rail translate <0 -25 0> }
  445.        bounded_by { 
  446.        intersection { Cube scale <245 60 5> } 
  447.        }
  448. scale <1 1.22 1>
  449. }
  450.  
  451.  
  452. //--- Bridge Section
  453. #declare bridge = 
  454. object {
  455.   difference {
  456.     union {
  457.      intersection { Cube scale <200 160 100> } 
  458.      intersection { Cube scale <200 10 110> translate <0 135 0> } 
  459.     }
  460.     quadric { Cylinder_Z scale <60 60 1> translate <-100 50 0> }
  461.     quadric { Cylinder_Z scale <60 60 1> translate <100 50 0> }
  462.     intersection { Cube scale <60 120 160> translate <-100 -70 0> } 
  463.     intersection { Cube scale <60 120 160> translate <100 -70 0> } 
  464.   }
  465.        texture { st3 scale <100 60 20> diffuse 0.5 }
  466.        texture { st2 scale <200 90 60> ambient 0.2 rotate <0 0 35> }
  467.        texture { color DimGray alpha 0.6 ambient 0.2 phong 1.0 phong_size 30 }
  468.     bounded_by { 
  469.     intersection { Cube scale <201 161 121> }
  470.     }
  471. scale <2 2 2.2>
  472. }
  473.  
  474. composite {
  475.   //--- Bridge Base
  476.   object {
  477.     intersection { Cube scale <3000 10 130> }
  478.        texture { 
  479.     color DimGray 
  480.     0.05 
  481.     ambient 0.2 
  482.     diffuse 0.5 
  483.     }
  484.    }
  485.    
  486.    //---Silver Track
  487.    object {
  488.      union {
  489.        intersection { Cube scale <3000 10 10> translate <0 10 -100> }
  490.        intersection { Cube scale <3000 10 10> translate <0 10 100> }
  491.      } 
  492.          texture { silver }
  493.    }
  494.         bounded_by { 
  495.         intersection { Cube scale <3000 20 135> }
  496.         }
  497.    translate <-1000 0 800>
  498. }
  499.  
  500.  
  501.  
  502. //---- Lower Marble Floor
  503. object {
  504.    intersection { Cube scale <1800 1800 5> }
  505.      texture { 
  506.     tiles { 
  507.       texture { t1 } 
  508.       tile2
  509.       texture { t2  } 
  510.         }
  511.       scale <50 50 2> 
  512.      }
  513.      texture { 
  514.     checker 
  515.     color DimGray 
  516.     alpha 0.3 
  517.     color DimGray 
  518.     alpha 0.5
  519.     scale <105 107.8 2> 
  520.     phong 1.0
  521.     ambient .1 
  522.     reflection 0.3     
  523.       }
  524.   rotate <90 0 0> translate <1000 -124 500> 
  525. }
  526.  
  527.  
  528.