Metropoli BBS
VIEWER: desk.pov MODE: TEXT (SF7)
// Persistence Of Vision raytracer version 2.0 sample file.

// By  Tom Price
// Requires "rough.gif" 320x200x256, but feel free to substitute any
// image that you wish.  (It goes in a picture frame on the desk)

#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"

#declare
RedPencil = union ä
   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 30.0 å
      plane ä y, 0.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Red å
   å

   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 32.0 å
      plane ä y, 30.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Tan å
   å
å

#declare
GreenPencil = union ä
   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 30.0 å
      plane ä y, 0.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Green å
   å

   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 32.0 å
      plane ä y, 30.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Tan å
   å
å

#declare
BluePencil = union ä
   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 30.0 å
      plane ä y, 0.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Blue å
   å
   intersection ä
      object ä Cylinder_Y scale <0.5, 1.0, 0.5> å
      plane ä y, 32.0 å
      plane ä y, 30.0 inverse å

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä Tan å
   å
å

camera ä
   location <0.0, 40.0, -150.0>
   up <0.0, 1.0, 0.0>
   right <4/3, 0.0, 0.0>
   look_at <0.0, 0.0, 0.0>
å

/*The back wall*/

plane ä z, 200.0
   finish ä
      crand 0.1
      ambient 0.3
      diffuse 0.7
   å
   pigment ä LightGray å
å

/*The ceiling*/
plane ä y,  500.0
   finish ä
      crand 0.1
      ambient 0.3
      diffuse 0.7
   å
   pigment ä White å
å


/*The desk surface*/
intersection ä
   plane ä y,    2.0 å
   plane ä y,   -2.0 inverse å
   plane ä z,  100.0 å
   plane ä z, -100.0 inverse å
   plane ä x,  125.0 å
   plane ä x, -125.0 inverse å

   translate -20.0*y

   finish ä
      crand 0.05
      ambient 0.4
      diffuse 0.6
      reflection 0.2
      brilliance 3.0
   å
   pigment ä
      Dark_Wood
      scale <5.0, 1.0, 1.0>
   å
å

/*Paperwork*/
union ä
   triangle ä
      <0.0, 0.0, 0.0>
      <8.5, 0.0, 0.0>
      <0.0, 0.0, -11.0>
   å
   triangle ä
      <0.0, 0.0, -11.0>
      <8.5, 0.0, -11.0>
      <8.5, 0.0, 0.0>
   å

   scale <3.0, 1.0, 3.0>
   rotate -30.0*y
   translate <-20.0, -17.9, -40.0>

   finish ä
      crand 0.05
      ambient 0.1
      diffuse 0.4
   å
   pigment ä colour red 0.5 green 0.5 blue 0.3 å
å

/*a glass paperweight*/
intersection ä
   sphere ä <0.0, -5.0, 0.0>, 10.0 å
   plane ä y, 0.0 inverse å

   translate <0.0, -17.8, -35.0>

   finish ä
      ambient 0.1
      diffuse 0.6
      reflection 0.1
      refraction 1.0
      ior 1.5
      brilliance 2.0
   å
   pigment ä colour red 0.3 green 0.5 blue 0.3 filter 1.0 å
å

/*The desk lamp*/

union ä
   object ä
      intersection ä
         object ä Cylinder_Y scale <3.0, 1.0, 3.0> å
         plane ä y, 40.0 å
         plane ä y, -18.0 inverse å
      å

      finish ä
         Shiny
         crand 0.05
         ambient 0.2
         diffuse 0.7
      å
      pigment ä colour red 0.7 green 0.6 blue 0.1 å
   å

   intersection ä
      object ä Cylinder_Y scale <25.0, 1.0, 25.0> å
      plane ä y, 2.0 å
      plane ä y, -2.0 inverse å

      translate <0.0, -16.0, -5.0>

      finish ä
         crand 0.05
         ambient 0.3
         diffuse 0.6
         reflection 0.4
         brilliance 4.0
      å
      normal ä bumps 0.1 å
      pigment ä colour red 0.5 green 0.4 blue 0.1 å
   å

   intersection ä
      object ä Cylinder_X scale <1.0, 10.0, 10.0> å
      object ä Cylinder_X scale <1.0, 9.95, 9.95> inverse å
      plane ä y, 0.0 inverse å
      plane ä x, -30.0 inverse å
      plane ä x, 30.0 å

      translate <0.0, 35.0, -13.0>

      finish ä
         Shiny
         crand 0.05
         ambient 0.5
         diffuse 0.5
         reflection 0.3
         brilliance 4.0
      å
      pigment ä DarkGreen å
   å

   union ä
      intersection ä
         sphere ä <-30.0, 35.0, -13.0>, 10.0 å
         sphere ä <-30.0, 35.0, -13.0>, 9.95 inverse å
         plane ä y, 35.0 inverse å
         plane ä x, -30.0 å
      å
      intersection ä
         plane ä y, 35.0 inverse å
         plane ä x, 30.0 inverse å
         sphere ä <30.0, 35.0, -13.0>, 10.0 å
         sphere ä <30.0, 35.0, -13.0>, 9.95 inverse å
      å

      finish ä
         Shiny
         crand 0.05
         ambient 0.2
         diffuse 0.7
      å
      pigment ä colour red 0.7 green 0.6 blue 0.1 å
   å

   rotate 35*y
   translate <50.0, 0.0, 30.0>
å

/*The fluorescent tube inside the lamp*/

light_source ä
    <0, 0, 0> color White

    looks_like ä
       intersection ä
          object ä Cylinder_X å
          plane ä x, -25.0 inverse å
          plane ä x,  25.0 å

          pigment ä White å
          finish ä ambient 1 diffuse 0 å
      å
   å

   translate <0.0, 43.0, -10.0>
   rotate 35*y
   translate <50.0, 0.0, 30.0>
å

/*The Picture itself*/

union ä
   intersection ä
      plane ä x,  1.0 å
      plane ä x, -1.0 inverse å
      plane ä y,  1.0 å
      plane ä y, -1.0 inverse å
      plane ä z,  1.0 å
      plane ä z, -1.0 inverse å

      translate <1.0, 1.0, 1.0>
      scale <20.0, 15.0, 1.0>

      finish ä
         ambient 0.05
         diffuse 0.9
      å
      pigment ä
         image_map ä gif "rough.gif" once interpolate 2.0 å
         scale <40.0, 30.0, 1.0>
         scale <1.5, 1.5, 1.0>
      å
   å

   /* The picture frame */
   union ä
      intersection ä
         union ä
            object ä Cylinder_Y translate 41*x å
            object ä Cylinder_Y translate -1*x å
         å
         plane ä y, 31.0 å
         plane ä y, -1.0 inverse å
      å
      intersection ä
         union ä
            object ä Cylinder_X translate 31*y å
            object ä Cylinder_X translate -1*y å
         å
         plane ä x, 41.0 å
         plane ä x, -1.0 inverse å
      å
      sphere ä <-1.0, -1.0, 0.0>, 1.0 å
      sphere ä <-1.0, 31.0, 0.0>, 1.0 å
      sphere ä <41.0, -1.0, 0.0>, 1.0 å
      sphere ä <41.0, 31.0, 0.0>, 1.0 å

      finish ä
         Shiny
         crand 0.05
         ambient 0.3
         diffuse 0.7
      å
      pigment ä colour red 0.6 green 0.5 blue 0.1 å
   å

   scale 1.5
   rotate <10.0, -35.0, 0.0>
   translate <-65.0, -15.0, -25.0>
å

/*The pencil holder*/
union ä
   intersection ä
      object ä Cylinder_Y scale <5.0, 1.0, 5.0> å
      object ä Cylinder_Y scale <4.8, 1.0, 4.8> inverse å
      plane ä y, 0.0 inverse å
      plane ä y, 15.0 rotate -45*x å

      finish ä
         Shiny
         crand 0.05
         ambient 0.3
         diffuse 0.7
         reflection 0.4
         brilliance 6.0
      å
      pigment ä colour red 0.7 green 0.6 blue 0.1 å
   å
   object ä
      RedPencil
      rotate -2*z
      translate <1.0, 0.0, 1.0>
   å
   object ä
      GreenPencil
      rotate 2.0*z
      translate <-1.0, 3.0, 0.0>
   å
   object ä 
      BluePencil
      rotate <-2.0, 0.0, 3.0>
      translate <0.0, -2.0, -1.0>
   å

   bounded_by ä
      intersection ä
         object ä Cylinder_Y scale <6.0, 1.0, 6.0> å
         plane ä y, 36.0 å
         plane ä y, -4.0 inverse å
      å
   å

   rotate 45*y
   translate <70.0, -18.0, -20.0>
å

/*The light source*/

light_source ä <20.0, 100.0, -200.0> colour White å
[ RETURN TO DIRECTORY ]