home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVSCN.ZIP / LEVEL3.ZIP / PIECE1.POV < prev    next >
Text File  |  1992-07-18  |  12KB  |  481 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // piece I: 
  4. //          by Truman Brown 11/91
  5. //          Close-up of a museum piece in the Woild Museum
  6.  
  7. #include "colors.inc"
  8. #include "textures.inc"
  9. #include "shapes.inc"
  10.  
  11. camera {
  12.    location  <-36.0     29.0 -70.0>
  13.    direction <  0.0      0.0   2.0  >
  14.    up        <  0.2      0.8   0.0  >
  15.    right     <  1.33333  0.0   0.0  >
  16.    look_at   <  0.0     -8.0   0.0  >
  17. }
  18.  
  19. // ----------------------------------------------------------------------------
  20. // lights
  21. // ----------------------------------------------------------------------------
  22. #declare Light1 =  color red 0.1 green 0.1 blue 0.1
  23. #declare Light2 =  color red 0.2 green 0.2 blue 0.2
  24. #declare Light3 =  color red 0.3 green 0.3 blue 0.3
  25. #declare Light4 =  color red 0.4 green 0.4 blue 0.4
  26. #declare Light5 =  color red 0.5 green 0.5 blue 0.5
  27.  
  28. #declare light1 = object { light_source { <0.0 0.0 0.0>  color Light1 } }
  29. #declare light2 = object { light_source { <0.0 0.0 0.0>  color Light2 } }
  30. #declare light3 = object { light_source { <0.0 0.0 0.0>  color Light3 } }
  31. #declare light4 = object { light_source { <0.0 0.0 0.0>  color Light4 } }
  32. #declare light5 = object { light_source { <0.0 0.0 0.0>  color Light5 } }
  33.  
  34. composite {
  35.    object { light1 translate <  35  30 -16>  }
  36.    object { light3 translate < -25  40  20>  }
  37.    object { light2 translate < -48  30 -20>  }
  38.    object { light5 translate <  20 -10 -22>  }
  39. }
  40.  
  41. // ----------------------------------------------------------------------------
  42. // textures
  43. // ----------------------------------------------------------------------------
  44. #declare rod_texture1 =
  45. texture {
  46.    color Firebrick
  47.    specular 0.9
  48.    roughness 0.001
  49.    ambient 0.0
  50.    diffuse 0.5
  51.    reflection 0.25
  52. }
  53.  
  54. #declare loop_texture =
  55. texture {
  56.    color Black
  57.    ambient 0.01
  58.    diffuse 0.45
  59.    specular 1.00
  60.    roughness 0.001
  61.    reflection 0.4
  62. }
  63.  
  64. #declare innertube_texture =
  65. texture {
  66.    color SteelBlue
  67.    ambient 0.05
  68.    diffuse 0.1
  69.    specular 1.00
  70.    roughness 0.001
  71.    reflection 0.90
  72. }
  73.  
  74. #declare balls_texture =
  75. texture {
  76.    color White
  77.    ambient 0.01
  78.    diffuse 0.3
  79.    specular 1.00
  80.    roughness 0.001
  81.    reflection 0.85
  82. }
  83.  
  84. #declare tile1_texture =
  85. texture {
  86.    0.05
  87.    wood
  88.    turbulence 0.5
  89.    color_map {
  90.       [0.0 0.7  color red 0.93 green 0.710 blue 0.532
  91.       color red 0.98 green 0.810 blue 0.600]
  92.       [0.7 1.01 color red 0.60 green 0.333 blue 0.266
  93.       color red 0.70 green 0.600 blue 0.23]
  94.    }
  95.    specular 1.0
  96.    roughness 0.001
  97.    scale <5 5 5>
  98.    ambient 0.05
  99.    diffuse 0.35
  100.    reflection 0.15
  101.    rotate <0 90 0>
  102. }
  103.  
  104. #declare tile2_texture =
  105. texture {
  106.    0.05
  107.    wood
  108.    turbulence 0.6
  109.    color_map {
  110.       [0.0 0.8  color red 0.42857 green 0.23810 blue 0.04762
  111.       color red 0.42857 green 0.23810 blue 0.04762]
  112.       [0.8 1.01 color red 0.4     green 0.333   blue 0.066
  113.       color red 0.2     green 0.033   blue 0.033]
  114.    }
  115.    specular 1.0
  116.    roughness 0.001
  117.    scale <7 7 7>
  118.    ambient 0.01
  119.    diffuse 0.75
  120.    reflection 0.15
  121. }
  122.  
  123. #declare frame_texture =
  124. texture {
  125.    Bronze_Texture
  126.    specular 1.0
  127.    roughness 0.001
  128.    ambient 0.11
  129.    diffuse 0.8
  130.    reflection 0.85
  131. }
  132.  
  133. // ----------------------------------------------------------------------------
  134. // torus primatives
  135. // ----------------------------------------------------------------------------
  136. #declare torus1 =
  137. quartic { <
  138.    1.0 0.0   0.0  0.0   2.0      /* major radius: 5.0 */
  139.    0.0 0.0   2.0  0.0 -50.5      /* minor radius: 0.5 */
  140.    0.0 0.0   0.0  0.0   0.0      /* outer radius: 5.5 */
  141.    0.0 0.0   0.0  0.0   0.0      /* inner radius: 4.5 */
  142.    1.0 0.0   0.0  2.0   0.0
  143.    49.5 0.0   0.0  0.0   0.0
  144.    1.0 0.0 -50.50 0.0 612.5625 >
  145. }
  146.  
  147. #declare torus2=
  148. quartic { <
  149.    1.0 0.0  0.0  0.0  2.0        /* major radius: 0.8 */
  150.    0.0 0.0  2.0  0.0 -1.36       /* minor radius: 0.2 */
  151.    0.0 0.0  0.0  0.0  0.0        /* outer radius: 1.0 */
  152.    0.0 0.0  0.0  0.0  0.0        /* inner radius: 0.6 */
  153.    1.0 0.0  0.0  2.0  0.0
  154.    1.2 0.0  0.0  0.0  0.0
  155.    1.0 0.0 -1.36 0.0  0.36 >
  156. }
  157.  
  158. #declare torus3 =
  159. quartic { <
  160.    1.0 0.0    0.0 0.0     2.0     /* major radius: 12.0 */
  161.    0.0 0.0    2.0 0.0  -296.0     /* minor radius:  2.0 */
  162.    0.0 0.0    0.0 0.0     0.0     /* outer radius: 14.0 */
  163.    0.0 0.0    0.0 0.0     0.0     /* inner radius: 10.0 */
  164.    1.0 0.0    0.0 2.0     0.0
  165.    280.0 0.0    0.0 0.0     0.0
  166.    1.0 0.0 -296.0 0.0 19600.0 >
  167. }
  168.  
  169. #declare torus4 =
  170. quartic { <
  171.    1.0 0.0   0.0 0.0    2.0       /* major radius: 7.0 */
  172.    0.0 0.0   2.0 0.0  -98.5       /* minor radius: 0.5 */
  173.    0.0 0.0   0.0 0.0    0.0       /* outer radius: 7.5 */
  174.    0.0 0.0   0.0 0.0    0.0       /* inner radius: 6.5 */
  175.    1.0 0.0   0.0 2.0    0.0
  176.    97.5 0.0   0.0 0.0    0.0
  177.    1.0 0.0 -98.5 0.0 2376.5625 >
  178. }
  179.  
  180. // ----------------------------------------------------------------------------
  181. // piece definitions
  182. // ----------------------------------------------------------------------------
  183. #declare halfring =
  184. object {
  185.    quartic { torus1 rotate <90 0 0>  }
  186.    clipped_by {
  187.       plane { <0 -1 0> 0  }
  188.    }
  189.    texture {
  190.       rod_texture1
  191.    }
  192.    bounded_by {
  193.       sphere { <0 0 0> 5.51  }
  194.    }
  195.    translate <-12 0 0>
  196. }
  197.  
  198. #declare halfring_array =
  199. composite {
  200.    object { halfring rotate <0  -10 0>  }
  201.    object { halfring rotate <0  -40 0>  }
  202.    object { halfring rotate <0 -100 0>  }
  203.    object { halfring rotate <0 -130 0>  }
  204.    object { halfring rotate <0 -190 0>  }
  205.    object { halfring rotate <0 -220 0>  }
  206.    object { halfring rotate <0 -280 0>  }
  207.    object { halfring rotate <0 -310 0>  }
  208.    bounded_by {
  209.       sphere { <0 0 0> 17.51  }
  210.    }
  211. }
  212.  
  213. #declare quarterring =
  214. object {
  215.    quartic { torus1 rotate <90 0 0>  }
  216.    clipped_by {
  217.       plane { <0 1 0> 0  }
  218.       plane { <1 0 0> 0  }
  219.    }
  220.    texture {
  221.       rod_texture1
  222.    }
  223.    bounded_by {
  224.       sphere { <-2.75 -2.75 0> 3.9  }
  225.    }
  226.    translate <-12 0 0>
  227. }
  228.  
  229. #declare quarterring_array =
  230. composite {
  231.    object { quarterring rotate <0  -10 0>  }
  232.    object { quarterring rotate <0  -40 0>  }
  233.    object { quarterring rotate <0 -100 0>  }
  234.    object { quarterring rotate <0 -130 0>  }
  235.    object { quarterring rotate <0 -190 0>  }
  236.    object { quarterring rotate <0 -220 0>  }
  237.    object { quarterring rotate <0 -280 0>  }
  238.    object { quarterring rotate <0 -310 0>  }
  239.    bounded_by {
  240.       sphere { <0 0 0> 17.51  }
  241.    }
  242. }
  243.  
  244. #declare ringball =
  245. object {
  246.    sphere { <0 -5.0 0> 1.0  }
  247.    texture {
  248.       rod_texture1
  249.    }
  250.    translate <-12 0 0>
  251. }
  252.  
  253. #declare ringball_array =
  254. composite {
  255.    object { ringball rotate <0  -10 0>  }
  256.    object { ringball rotate <0  -40 0>  }
  257.    object { ringball rotate <0 -100 0>  }
  258.    object { ringball rotate <0 -130 0>  }
  259.    object { ringball rotate <0 -190 0>  }
  260.    object { ringball rotate <0 -220 0>  }
  261.    object { ringball rotate <0 -280 0>  }
  262.    object { ringball rotate <0 -310 0>  }
  263.    bounded_by {
  264.       sphere { <0 0 0> 13.5  }
  265.    }
  266. }
  267.  
  268. #declare pole =
  269. object {
  270.    intersection {
  271.       Disk_Y
  272.       rotate <180 0 0>
  273.       scale <0.5 20 0.5>
  274.       translate <5 0 0>
  275.    }
  276.    texture {
  277.       rod_texture1
  278.    }
  279.    translate <-12 0 0>
  280. }
  281.  
  282. #declare pole_array =
  283. composite {
  284.    object { pole rotate <0  -10 0>  }
  285.    object { pole rotate <0  -40 0>  }
  286.    object { pole rotate <0 -100 0>  }
  287.    object { pole rotate <0 -130 0>  }
  288.    object { pole rotate <0 -190 0>  }
  289.    object { pole rotate <0 -220 0>  }
  290.    object { pole rotate <0 -280 0>  }
  291.    object { pole rotate <0 -310 0>  }
  292.    bounded_by {
  293.       sphere { <0 -10 0> 13.5  }
  294.    }
  295. }
  296.  
  297. #declare blueloop =
  298. object {
  299.    quartic { torus2 rotate <0 0 90>  }
  300.    texture {
  301.       loop_texture
  302.    }
  303.    bounded_by {
  304.       sphere { <0 0 0> 1.1  }
  305.    }
  306. }
  307.  
  308. #declare blueloop_set =
  309. composite {
  310.    object { blueloop translate <0 5 0> rotate <0 0 0>  }
  311.    object { blueloop translate <0 5 0> rotate <0 0 90>  }
  312.    object { blueloop translate <0 5 0> rotate <0 0 -90>  }
  313.    bounded_by {
  314.       sphere { <0 0 0> 6.51  }
  315.    }
  316.    translate <-12 0 0>
  317. }
  318.  
  319. #declare blueloop_array =
  320. composite {
  321.    composite { blueloop_set rotate <0  -10 0>  }
  322.    composite { blueloop_set rotate <0  -40 0>  }
  323.    composite { blueloop_set rotate <0 -100 0>  }
  324.    composite { blueloop_set rotate <0 -130 0>  }
  325.    composite { blueloop_set rotate <0 -190 0>  }
  326.    composite { blueloop_set rotate <0 -220 0>  }
  327.    composite { blueloop_set rotate <0 -280 0>  }
  328.    composite { blueloop_set rotate <0 -310 0>  }
  329.    bounded_by {
  330.       sphere { <0 0 0> 18.51  }
  331.    }
  332. }
  333.  
  334. #declare basering =
  335. object {
  336.    quartic { torus4  }
  337.    texture {
  338.       rod_texture1
  339.    }
  340.    bounded_by {
  341.       sphere { <0 0 0> 7.6  }
  342.    }
  343.    translate <0 -20.5 0>
  344. }
  345.  
  346. #declare innertube =
  347. object {
  348.    quartic { torus3  }
  349.    texture {
  350.       innertube_texture
  351.    }
  352.    bounded_by {
  353.       sphere { <0 0 0> 14.1  }
  354.    }
  355. }
  356.  
  357. #declare structurebase =
  358. composite {
  359.    composite { halfring_array     }
  360.    composite { quarterring_array  }
  361.    composite { ringball_array     }
  362.    composite { blueloop_array     }
  363.    composite { pole_array         }
  364.    object { basering   }
  365.    object { innertube  }
  366.    bounded_by {
  367.       sphere { <0 0 0> 22  }
  368.    }
  369. }
  370.  
  371. #declare balls =
  372. object {
  373.    sphere { <0 0 0> 4.0  }
  374.    texture {
  375.       balls_texture
  376.    }
  377. }
  378.  
  379. #declare block1 =
  380. object {
  381.    intersection {
  382.       intersection {
  383.          Cube
  384.          scale <10 1 10>
  385.       }
  386.       quadric {
  387.          Cylinder_Y
  388.          scale <6 1 6>
  389.          inverse
  390.       }
  391.    }
  392.    texture {
  393.       tile1_texture
  394.    }
  395.    bounded_by {
  396.       sphere { <0 0 0> 15  }
  397.    }
  398. }
  399.  
  400. #declare block2 =
  401. object {
  402.    intersection {
  403.       intersection {
  404.          Cube
  405.          scale <10 1 10>
  406.       }
  407.       quadric {
  408.          Cylinder_Y
  409.          scale <6 1 6>
  410.          inverse
  411.       }
  412.    }
  413.    texture {
  414.       tile2_texture
  415.    }
  416.    bounded_by {
  417.       sphere { <0 0 0> 15  }
  418.    }
  419. }
  420.  
  421. #declare frame =
  422. object {
  423.    intersection {
  424.       Cube
  425.       scale <21 1.5 21>
  426.    }
  427.    clipped_by {
  428.       intersection {
  429.          Cube
  430.          scale <20 2 20>
  431.          inverse
  432.       }
  433.    }
  434.    texture { frame_texture  }
  435. }
  436.  
  437. #declare bigtile =
  438. composite {
  439.    object { block1 translate < 10 -1  10>  }
  440.    object { block1 translate <-10 -1 -10>  }
  441.    object { block2 translate <-10 -1  10>  }
  442.    object { block2 translate < 10 -1 -10>  }
  443.    object { frame  }
  444.    bounded_by {
  445.       intersection {
  446.          plane { < 1.0  0.0  0.0> 21.1  }
  447.          plane { <-1.0  0.0  0.0> 21.1  }
  448.          plane { < 0.0  1.0  0.0> 0.6  }
  449.          plane { < 0.0 -1.0  0.0> 2.6  }
  450.          plane { < 0.0  0.0  1.0> 21.1  }
  451.          plane { < 0.0  0.0 -1.0> 21.1  }
  452.       }
  453.    }
  454. }
  455.  
  456. #declare floor =
  457. composite {
  458.    composite { bigtile  }
  459. }
  460.  
  461. // color debugger
  462. // object { quadric { Cylinder_Y scale <3 1 3>  } texture { rod_texture1  }  }
  463. // object { quadric { Cylinder_X scale <1 3 3>  } texture { rod_texture1  }  }
  464.  
  465. //-----------------------------------------------------------------------------
  466. // Put it all together and render it
  467. //-----------------------------------------------------------------------------
  468. composite { structurebase  }
  469. composite {
  470.    object { balls translate <0  0 0>  }
  471.    object { balls translate <0 -8 0>  }
  472.    object { balls translate <0 -16 0>  }
  473.    bounded_by {
  474.       quadric {
  475.          Cylinder_Y
  476.          scale <4.1 1 4.1>
  477.       }
  478.    }
  479. }
  480. composite { floor rotate <0 45 0> translate < 0 -20 0>  }
  481.