home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovscn / 3 / desk.pov < prev    next >
Text File  |  1992-07-21  |  9KB  |  420 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By  Tom Price
  4. // Requires "rough.gif" 320x200x256, but feel free to substitute any
  5. // image that you wish.  (It goes in a picture frame on the desk)
  6.  
  7. #include "shapes.inc"
  8. #include "colors.inc"
  9. #include "textures.inc"
  10.  
  11. #declare
  12. RedPencil = composite {
  13.    object {
  14.       intersection {
  15.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  16.          plane { <0.0 1.0 0.0> 30.0 }
  17.          plane { <0.0 1.0 0.0> 0.0 inverse }
  18.       }
  19.       texture {
  20.          0.05
  21.          ambient 0.3
  22.          diffuse 0.7
  23.          colour red 1.0
  24.       }
  25.    }
  26.  
  27.    object {
  28.       intersection {
  29.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  30.          plane { <0.0 1.0 0.0> 32.0 }
  31.          plane { <0.0 1.0 0.0> 30.0 inverse }
  32.       }
  33.       texture {
  34.          0.05
  35.          ambient 0.3
  36.          diffuse 0.7
  37.          colour Tan
  38.       }
  39.    }
  40. }
  41.  
  42. #declare
  43. GreenPencil = composite {
  44.    object {
  45.       intersection {
  46.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  47.          plane { <0.0 1.0 0.0> 30.0 }
  48.          plane { <0.0 1.0 0.0> 0.0 inverse }
  49.       }
  50.       texture {
  51.          0.05
  52.          ambient 0.3
  53.          diffuse 0.7
  54.          colour green 1.0
  55.       }
  56.    }
  57.    object {
  58.       intersection {
  59.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  60.          plane { <0.0 1.0 0.0> 32.0 }
  61.          plane { <0.0 1.0 0.0> 30.0 inverse }
  62.       }
  63.       texture {
  64.          0.05
  65.          ambient 0.3
  66.          diffuse 0.7
  67.          colour Tan
  68.       }
  69.    }
  70. }
  71.  
  72. #declare
  73. BluePencil = composite {
  74.    object {
  75.       intersection {
  76.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  77.          plane { <0.0 1.0 0.0> 30.0 }
  78.          plane { <0.0 1.0 0.0> 0.0 inverse }
  79.       }
  80.       texture {
  81.          0.05
  82.          ambient 0.3
  83.          diffuse 0.7
  84.          colour blue 1.0
  85.       }
  86.    }
  87.    object {
  88.       intersection {
  89.          quadric { Cylinder_Y scale <0.5 1.0 0.5> }
  90.          plane { <0.0 1.0 0.0> 32.0 }
  91.          plane { <0.0 1.0 0.0> 30.0 inverse }
  92.       }
  93.       texture {
  94.          0.05
  95.          ambient 0.3
  96.          diffuse 0.7
  97.          colour Tan
  98.       }
  99.    }
  100. }
  101.  
  102. camera {
  103.    location <0.0 40.0 -150.0>
  104.    up <0.0 1.0 0.0>
  105.    right <1.3333 0.0 0.0>
  106.    look_at <0.0 0.0 0.0>
  107. }
  108.  
  109. /*The back wall*/
  110.  
  111. object {
  112.    plane { <0.0 0.0 1.0> 200.0 }
  113.    texture {
  114.       0.1
  115.       ambient 0.3
  116.       diffuse 0.7
  117.       colour LightGray
  118.    }
  119.    colour LightGray
  120. }
  121.  
  122. /*The ceiling*/
  123. object {
  124.    plane { <0.0 1.0 0.0> 500.0 }
  125.    texture {
  126.       0.1
  127.       ambient 0.3
  128.       diffuse 0.7
  129.       colour White
  130.    }
  131. }
  132.  
  133.  
  134. /*The desk surface*/
  135.  
  136. object {
  137.    intersection {
  138.       plane { <0.0 1.0 0.0> 2.0 }
  139.       plane { <0.0 1.0 0.0> -2.0 inverse }
  140.       plane { <0.0 0.0 1.0> 100.0 }
  141.       plane { <0.0 0.0 1.0> -100.0 inverse }
  142.       plane { <1.0 0.0 0.0> 125.0 }
  143.       plane { <1.0 0.0 0.0> -125.0 inverse }
  144.    }
  145.    translate <0.0 -20.0 0.0>
  146.    texture {
  147.       0.05
  148.       ambient 0.4
  149.       diffuse 0.6
  150.       Dark_Wood
  151.       scale <5.0 1.0 1.0>
  152.       reflection 0.2
  153.       brilliance 3.0
  154.    }
  155. }
  156.  
  157. /*Paperwork*/
  158. object {
  159.    union {
  160.       triangle {
  161.          <0.0 0.0 0.0>
  162.          <8.5 0.0 0.0>
  163.          <0.0 0.0 -11.0>
  164.       }
  165.       triangle {
  166.          <0.0 0.0 -11.0>
  167.          <8.5 0.0 -11.0>
  168.          <8.5 0.0 0.0>
  169.       }
  170.    }
  171.    scale <3.0 1.0 3.0>
  172.    rotate <0.0 -30.0 0.0>
  173.    translate <-20.0 -17.9 -40.0>
  174.  
  175.    texture {
  176.       0.05
  177.       ambient 0.1
  178.       diffuse 0.4
  179.       colour red 0.5 green 0.5 blue 0.3
  180.    }
  181.    colour red 0.5 green 0.5 blue 0.3
  182. }
  183.  
  184. /*a glass paperweight*/
  185. object {
  186.    intersection {
  187.       sphere { <0.0 -5.0 0.0> 10.0 }
  188.       plane { <0.0 1.0 0.0> 0.0 inverse }
  189.    }
  190.    translate <0.0 -17.8 -35.0>
  191.    texture {
  192.       ambient 0.1
  193.       diffuse 0.6
  194.       colour red 0.3 green 0.5 blue 0.3 alpha 1.0
  195.       reflection 0.1
  196.       refraction 1.0
  197.       ior 1.5
  198.       brilliance 2.0
  199.    }
  200. }
  201.  
  202. /*The desk lamp*/
  203.  
  204. composite {
  205.    object {
  206.       intersection {
  207.          quadric { Cylinder_Y scale <3.0 1.0 3.0> }
  208.          plane { <0.0 1.0 0.0> 40.0 }
  209.          plane { <0.0 1.0 0.0> -18.0 inverse }
  210.       }
  211.       texture {
  212.          Shiny
  213.          0.05
  214.          ambient 0.2
  215.          diffuse 0.7
  216.          colour red 0.7 green 0.6 blue 0.1
  217.       }
  218.    }
  219.  
  220.    object {
  221.       intersection {
  222.          quadric { Cylinder_Y scale <25.0 1.0 25.0> }
  223.          plane { <0.0 1.0 0.0> 2.0 }
  224.          plane { <0.0 1.0 0.0> -2.0 inverse }
  225.       }
  226.       translate <0.0 -16.0 -5.0>
  227.       texture {
  228.          0.05
  229.          ambient 0.3
  230.          diffuse 0.6
  231.          colour red 0.5 green 0.4 blue 0.1
  232.          reflection 0.4
  233.          brilliance 4.0
  234.          bumps 0.1
  235.       }
  236.    }
  237.  
  238.    object {
  239.       intersection {
  240.          quadric { Cylinder_X scale <1.0 10.0 10.0> }
  241.          quadric { Cylinder_X scale <1.0 9.95 9.95> inverse }
  242.          plane { <0.0 1.0 0.0> 0.0 inverse }
  243.          plane { <1.0 0.0 0.0> -30.0 inverse }
  244.          plane { <1.0 0.0 0.0> 30.0 }
  245.       }
  246.       translate <0.0 35.0 -13.0>
  247.       texture {
  248.          Shiny
  249.          0.05
  250.          ambient 0.5
  251.          diffuse 0.5
  252.          colour DarkGreen 
  253.          reflection 0.3
  254.          brilliance 4.0
  255.       }
  256.    }
  257.  
  258.    object {
  259.       union {
  260.          intersection {
  261.             sphere { <-30.0 35.0 -13.0> 10.0 }
  262.             sphere { <-30.0 35.0 -13.0> 9.95 inverse }
  263.             plane { <0.0 1.0 0.0> 35.0 inverse }
  264.             plane { <1.0 0.0 0.0> -30.0 }
  265.          }
  266.          intersection {
  267.             plane { <0.0 1.0 0.0> 35.0 inverse }
  268.             plane { <1.0 0.0 0.0> 30.0 inverse }
  269.             sphere { <30.0 35.0 -13.0> 10.0 }
  270.             sphere { <30.0 35.0 -13.0> 9.95 inverse }
  271.          }
  272.       }
  273.       texture {
  274.          Shiny
  275.          0.05
  276.          ambient 0.2
  277.          diffuse 0.7
  278.          colour red 0.7 green 0.6 blue 0.1
  279.       }
  280.    }
  281.  
  282.  
  283.    rotate <0.0 35.0 0.0>
  284.    translate <50.0 0.0 30.0>
  285.  
  286. }
  287.  
  288. /*The fluorescent tube inside the lamp*/
  289.  
  290. object {
  291.    union {
  292.       intersection {
  293.          quadric { Cylinder_X }
  294.          plane { <1.0 0.0 0.0> -25.0 inverse }
  295.          plane { <1.0 0.0 0.0>  25.0 }
  296.       }
  297.       light_source { <0 0 0> color White }
  298.    }
  299.    translate <0.0 43.0 -10.0>
  300.    rotate <0.0 35.0 0.0>
  301.    translate <50.0 0.0 30.0>
  302. }
  303.  
  304. /*The Picture itself*/
  305.  
  306. composite {
  307.    object {
  308.       intersection {
  309.          plane { <1.0 0.0 0.0> 1.0 }
  310.          plane { <1.0 0.0 0.0> -1.0 inverse }
  311.          plane { <0.0 1.0 0.0> 1.0 }
  312.          plane { <0.0 1.0 0.0> -1.0 inverse }
  313.          plane { <0.0 0.0 1.0> 1.0 }
  314.          plane { <0.0 0.0 1.0> -1.0 inverse }
  315.       }
  316.       translate <1.0 1.0 1.0>
  317.       scale <20.0 15.0 1.0>
  318.       texture {
  319.          ambient 0.05
  320.          diffuse 0.9
  321.          image_map { <1.0 -1.0 0.0> gif "rough.gif" once 
  322.             interpolate 2.0
  323.          }
  324.          scale <40.0 30.0 1.0>
  325.          scale <1.5 1.5 1.0>
  326.       }
  327.    }
  328.  
  329.    /* The picture frame */
  330.    object {
  331.       union {
  332.          intersection {
  333.             union {
  334.                quadric { Cylinder_Y scale <1.0 1.0 1.0> translate <41.0 0.0 0.0> }
  335.                quadric { Cylinder_Y scale <1.0 1.0 1.0> translate <-1.0 0.0 0.0> }
  336.             }
  337.             plane { <0.0 1.0 0.0> 31.0 }
  338.             plane { <0.0 1.0 0.0> -1.0 inverse }
  339.          }
  340.          intersection {
  341.             union {
  342.                quadric { Cylinder_X scale <1.0 1.0 1.0> translate <0.0 31.0 0.0> }
  343.                quadric { Cylinder_X scale <1.0 1.0 1.0> translate <0.0 -1.0 0.0> }
  344.             }
  345.             plane { <1.0 0.0 0.0> 41.0 }
  346.             plane { <1.0 0.0 0.0> -1.0 inverse }
  347.          }
  348.          sphere { <-1.0 -1.0 0.0> 1.0 }
  349.          sphere { <-1.0 31.0 0.0> 1.0 }
  350.          sphere { <41.0 -1.0 0.0> 1.0 }
  351.          sphere { <41.0 31.0 0.0> 1.0 }
  352.       }
  353.       texture {
  354.          0.05
  355.          Shiny
  356.          colour red 0.6 green 0.5 blue 0.1
  357.          ambient 0.3
  358.          diffuse 0.7
  359.       }
  360.       colour red 0.6 green 0.5 blue 0.1
  361.    }
  362.  
  363.    scale <1.5 1.5 1.5>
  364.    rotate <10.0 -35.0 0.0>
  365.    translate <-65.0 -15.0 -25.0>
  366.  
  367. }
  368.  
  369. /*The pencil holder*/
  370. composite {
  371.    object {
  372.       intersection {
  373.          quadric { Cylinder_Y scale <5.0 1.0 5.0> }
  374.          quadric { Cylinder_Y scale <4.8 1.0 4.8> inverse }
  375.          plane { <0.0 1.0 0.0> 0.0 inverse }
  376.          plane { <0.0 1.0 0.0> 15.0 rotate <-45.0 0.0 0.0> }
  377.       }
  378.       texture {
  379.          0.05
  380.          Shiny
  381.          ambient 0.3
  382.          diffuse 0.7
  383.          colour red 0.7 green 0.6 blue 0.1
  384.          reflection 0.4
  385.          brilliance 6.0
  386.       }
  387.    }
  388.    composite { RedPencil
  389.       rotate <0.0 0.0 -2.0>
  390.       translate <1.0 0.0 1.0>
  391.    }
  392.    composite { GreenPencil
  393.       rotate <0.0 0.0 2.0>
  394.       translate <-1.0 3.0 0.0>
  395.    }
  396.    composite { BluePencil
  397.       rotate <-2.0 0.0 3.0>
  398.       translate <0.0 -2.0 -1.0>
  399.    }
  400.    bounded_by {
  401.       intersection {
  402.          quadric { Cylinder_Y scale <6.0 1.0 6.0> }
  403.          plane { <0.0 1.0 0.0> 36.0 }
  404.          plane { <0.0 1.0 0.0> -4.0 inverse }
  405.       }
  406.    }
  407.  
  408.    rotate <0.0 45.0 0.0>
  409.    translate <70.0 -18.0 -20.0>
  410.  
  411. }
  412.  
  413. /*The light source*/
  414.  
  415. object {
  416.    light_source { <20.0 100.0 -200.0>
  417.       colour White
  418.    }
  419. }
  420.