home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / pvrayfiles / SceneFiles / Desk2 < prev    next >
Text File  |  1988-06-16  |  23KB  |  939 lines

  1. // Persistence of Vision Raytracer
  2. // Sample Filer
  3. // By Brian Tucker
  4.  
  5. // My Desk - Well Sort Of
  6. // This is big, very big, needs at least 2.5megs of free RAM.
  7. // And takes a while due to the large number
  8. // Of primitives involoved. Sorry !! :-(
  9.  
  10. #include "<PVRay$Dir>.Dat.Colors"
  11. #include "<PVRay$Dir>.Dat.Shapes"
  12. #include "<PVLib$Dir>.Dat.Metals"
  13. #include "<PVRay$Dir>.Dat.Textures"
  14.  
  15. view_point
  16.    location <-50 10 -29.9>
  17.    direction <0 0 1>
  18.    up <0 1 0>
  19.    right <1.333333 0 0>
  20.    look_at <-20 -10 20>
  21. end_view_point
  22.  
  23. // Now to set up some declarations.
  24. // (Some is a bit of an understatement, but it suits the 
  25. //  current purpose fine.)
  26.  
  27. #declare Cradle_Ball = composite
  28.    object
  29.       sphere <0.0 -2.0 0.0> 1 end_sphere
  30.       texture
  31.          Metal_Silver
  32.       end_texture
  33.    end_object
  34.    object
  35.       intersection
  36.          union
  37.             quadric
  38.                Cylinder_Y
  39.                scale <0.01 1.0 0.01>
  40.                rotate <0.0 0.0 33.69>
  41.                translate <0.0 -2.0 0.0>
  42.             end_quadric
  43.             quadric
  44.                Cylinder_Y
  45.                scale <0.01 1.0 0.01>
  46.                rotate <0.0 0.0 -33.69>
  47.                translate <0.0 -2.0 0.0>
  48.             end_quadric
  49.          end_union
  50.          plane <0.0 1.0 0.0> 5 end_plane
  51.          plane <0.0 -1.0 0.0> 2 end_plane
  52.       end_intersection
  53.       texture
  54.          colour Black
  55.       end_texture
  56.    end_object
  57. end_composite
  58.  
  59. #declare Newtons_Cradle = composite
  60.    object
  61.       union
  62.          sphere <-5 -5 -5> 0.25 end_sphere
  63.          sphere < 5 -5 -5> 0.25 end_sphere
  64.          sphere <-5  5 -5> 0.25 end_sphere
  65.          sphere < 5  5 -5> 0.25 end_sphere
  66.          sphere <-5 -5  5> 0.25 end_sphere
  67.          sphere < 5 -5  5> 0.25 end_sphere
  68.          sphere <-5  5  5> 0.25 end_sphere
  69.          sphere < 5  5  5> 0.25 end_sphere
  70.       end_union
  71.       texture
  72.          Metal_Silver
  73.       end_texture
  74.    end_object
  75.    object
  76.       intersection
  77.          union
  78.             quadric
  79.                Cylinder_Z
  80.                scale <0.25 0.25 1.0>
  81.                translate <-5 5 0>
  82.             end_quadric
  83.             quadric
  84.                Cylinder_Z
  85.                scale <0.25 0.25 1.0>
  86.                translate <5 5 0>
  87.             end_quadric
  88.          end_union
  89.          plane <0.0 0.0 1.0> 5 end_plane
  90.          plane <0.0 0.0 -1.0> 5 end_plane
  91.       end_intersection
  92.       texture
  93.          Metal_Silver
  94.       end_texture
  95.    end_object
  96.    object
  97.       intersection
  98.          union
  99.             quadric
  100.                Cylinder_Y
  101.                scale <0.25 1.0 0.25>
  102.                translate <-5 0 -5>
  103.             end_quadric
  104.             quadric
  105.                Cylinder_Z
  106.                scale <0.25 1.0 0.25>
  107.                translate <-5 0 5>
  108.             end_quadric
  109.             quadric
  110.                Cylinder_Z
  111.                scale <0.25 1.0 0.25>
  112.                translate <5 0 -5>
  113.             end_quadric
  114.             quadric
  115.                Cylinder_Z
  116.                scale <0.25 1.0 0.25>
  117.                translate <5 0 5>
  118.             end_quadric
  119.          end_union
  120.          plane <0.0 1.0 0.0> 5 end_plane
  121.          plane <0.0 -1.0 0.0> 5 end_plane
  122.       end_intersection
  123.       texture
  124.          Metal_Silver
  125.       end_texture
  126.    end_object
  127.    object
  128.       intersection
  129.          union
  130.             quadric
  131.                Cylinder_X
  132.                scale <1.0 0.25 0.25>
  133.                translate <0 -5 5>
  134.             end_quadric
  135.             quadric
  136.                Cylinder_X
  137.                scale <1.0 0.25 0.25>
  138.                translate <0 -5 5>
  139.             end_quadric
  140.          end_union
  141.          plane <1.0 0.0 0.0> 5 end_plane
  142.          plane <-1.0 0.0 0.0> 5 end_plane
  143.       end_intersection
  144.       texture
  145.          Metal_Silver
  146.       end_texture
  147.    end_object
  148.    composite Cradle_Ball translate <0.0 0.0 -4.0> end_composite
  149.    composite Cradle_Ball translate <0.0 0.0 -2.0> end_composite
  150.    composite Cradle_Ball end_composite
  151.    composite Cradle_Ball translate <0.0 0.0 2.0> end_composite
  152.    composite Cradle_Ball translate <0.0 0.0 4.0> end_composite
  153.    bounded_by
  154.       sphere <0 0 0> 9 end_sphere
  155.    end_bound
  156. end_composite
  157.  
  158. #declare Desk_Lamp = composite
  159.    composite
  160.       object
  161.          intersection
  162.             quadric
  163.                Cylinder_X
  164.             end_quadric
  165.             quadric
  166.                Cylinder_X
  167.                scale <1.0 0.9 0.9>
  168.                inverse
  169.             end_quadric
  170.             plane <1.0 0.0 0.0> 5 end_plane
  171.             plane <-1.0 0.0 0.0> 5 end_plane
  172.             plane <0.0 -1.0 0.0> 0.5 end_plane
  173.          end_intersection
  174.          texture
  175.             colour ForestGreen alpha 0.4
  176.             ambient 0.0
  177.             diffuse 0.0
  178.             reflection 0.5
  179.             refraction 0.85
  180.             ior 1.5
  181.             phong 0.3
  182.             phongsize 60
  183.             transmit 0.0
  184.          end_texture
  185.       end_object
  186.       object
  187.          union
  188.             intersection
  189.                quadric
  190.                   Cylinder_X
  191.                end_quadric
  192.                plane <1.0 0.0 0.0> -5 end_plane
  193.                plane <-1.0 0.0 0.0> 5.5 end_plane
  194.                plane <0.0 -1.0 0.0> 0.5 end_plane
  195.             end_intersection
  196.             intersection
  197.                quadric
  198.                   Cylinder_X
  199.                end_quadric
  200.                plane <1.0 0.0 0.0> 5.5 end_plane
  201.                plane <-1.0 0.0 0.0> -5 end_plane
  202.                plane <0.0 -1.0 0.0> 0.5 end_plane
  203.             end_intersection
  204.          end_union
  205.          texture
  206.             Metal_Brass
  207.          end_texture
  208.       end_object
  209.       object
  210.          intersection
  211.             quadric
  212.                Cylinder_X
  213.                scale <1.0 0.5 0.5>
  214.             end_quadric
  215.             plane <1.0 0.0 0.0> 5 end_plane
  216.             plane <-1.0 0.0 0.0> 5 end_plane
  217.          end_intersection
  218.          texture
  219.             colour White
  220.             ambient 1.0
  221.             diffuse 0.0
  222.          end_texture
  223.          light_source
  224.          colour White
  225.       end_object
  226.       rotate <30.0 0.0 0.0>
  227.    end_composite
  228.    object
  229.       union
  230.          intersection
  231.             union
  232.                quadric
  233.                   Cylinder_Z
  234.                   scale <0.25 0.25 1.0>
  235.                   translate <-5.25 0.0 0.0>
  236.                end_quadric
  237.                quadric
  238.                   Cylinder_Z
  239.                   scale <0.25 0.25 1.0>
  240.                   translate <5.25 0.0 0.0>
  241.                end_quadric
  242.             end_union
  243.             plane <0.0 0.0 -1.0> 0 end_plane
  244.             plane <0.0 0.0 1.0> 1.5 end_plane
  245.          end_intersection
  246.          intersection
  247.             quadric
  248.                Cylinder_X
  249.                scale <1.0 0.25 0.25>
  250.                translate <0.0 0.0 1.5>
  251.             end_quadric
  252.             plane < 1.0 0.0 0.0> 5.25 end_plane
  253.             plane <-1.0 0.0 0.0> 5.25 end_plane
  254.          end_intersection
  255.          sphere < 5.25 0.0 1.5> 0.25 end_sphere
  256.          sphere <-5.25 0.0 1.5> 0.25 end_sphere
  257.          intersection
  258.             quadric
  259.                Cylinder_Y
  260.                scale <0.25 1.0 0.25>
  261.                translate <0.0 0.0 1.5>
  262.             end_quadric
  263.             plane <0.0  1.0 0.0> 0.0 end_plane
  264.             plane <0.0 -1.0 0.0> 5.0 end_plane
  265.          end_intersection
  266.          intersection
  267.             quadric
  268.                Cylinder_Y
  269.                scale <3.0 1.0 1.5>
  270.                translate <0.0 0.0 1.0>
  271.             end_quadric
  272.             plane <0.0 1.0 0.0> -5.0 end_plane
  273.             plane <0.0 -1.0 0.0> 5.5 end_plane
  274.          end_intersection
  275.       end_union
  276.       texture
  277.          Metal_Brass
  278.       end_texture
  279.    end_object
  280.    bounded_by 
  281.       sphere <0.0 0.75 -2.25> 7 end_sphere
  282.    end_bound
  283. end_composite
  284.  
  285. #declare Tumbler = object
  286.    intersection
  287.       quadric
  288.          Cylinder_Y
  289.          scale <2.0 1.0 2.0>
  290.       end_quadric
  291.       union
  292.          quadric
  293.             Cylinder_Y
  294.             scale <1.9 1.0 1.9>
  295.             inverse
  296.          end_quadric
  297.          plane <0.0 1.0 0.0> 1 end_plane
  298.       end_union
  299.       plane <0.0 1.0 0.0> 5 end_plane
  300.       plane <0.0 -1.0 0.0> 0 end_plane
  301.    end_intersection
  302.    texture
  303.       wrinkles 0.8
  304.       colour red 1.0 green 1.0 blue 1.0 alpha 0.8
  305.       ambient 0.0
  306.       diffuse 0.0
  307.       reflection