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