Dlugosz Gallary V — PCSG Image Expose

Here is what the image looks like from another angle. Notice that it is a real, solid object, and doesn't even use "noshadow", yet it has reasonable key and fill lighting angles.

Here is the source code. The interesting part is that the pillars are "sliced" at exactly the right place so they appear in back even though they are in front, using a little trigonometry on the camera position. If you move the camera slightly (such as to make a stereo image) the illusion will track the camera position.

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

declare loc_x= -80
declare loc_y= 40
declare loc_z= -80

#declare camera_1= 
   camera {
      location  <loc_x,loc_y,loc_z>     //isomorphic viewpoint
      direction <0, 0,  17>       //telephoto
      up        <0, 1,  0>
      right   <4/3, 0,  0>
      look_at   <3, 2, 0>
      }

#declare camera_2=    // a "sneak" look behind the illusion
   camera {
      location  <-10,100,-130>
      direction <0, 0,  17>
      up        <0, 1,  0>
      right   <4/3, 0,  0>
      look_at   <5, 1, 5>
      }

camera { camera_2 }

light_source {<loc_x,loc_y,loc_z> color White}   //flat lighting (shadow-free)
light_source {<loc_x,loc_y+50,loc_z> color White}


// Floor plane 
plane { y, 0
   pigment {NeonBlue}
   finish {ambient 0.15 diffuse 0.8}
}

#declare T1 = texture { Pink_Granite  scale 0.5 }
#declare T2 = texture { Jade  scale 0.5 }

#declare wws = // water-way segment
   box { <0,0,0> , <6,0.5,1> }

union {
   object { wws }
   object {
      wws
      rotate y*-90
      translate x*6
      }
   object {
      wws
      translate <5,0,5>
      }
   object {
      wws
      rotate y*-90
      translate <11,0,5>
      }
   texture {
      T1
      finish {
         ambient 0.2
         diffuse 0.7
         phong 1
         phong_size 80
         brilliance 2
         }
      }
   }

#declare illusion_plane_x1 =
   plane { <0,25-5*loc_z,5*loc_y>,0 translate <loc_x,loc_y,loc_z> }
   // this matches the edge of the middle X stick

#declare illusion_plane_z1 =
   plane { <loc_y, 5-loc_x, 0>,0 translate <loc_x,loc_y,loc_z> }
   // this matches lower edge of lower Z stick.

#declare illusion_plane_z2 =
   plane { <loc_y, 10-loc_x, 0>,0 translate <loc_x,loc_y,loc_z> }
   // this matches lower edge of upper Z stick. (I hope)


// try some columbns
intersection {         //the right-hand side
   cylinder {<5.5,0,0.5>,<5.5,10,0.5>,.25}
   // cut off illusion plane
   plane { illusion_plane_x1 }
   texture { T2 }
   }

intersection {
   cylinder {<.5,0,.5>,<.5,10,0.5>,.25}      //left side, bottom
   plane { illusion_plane_z1 }
   texture { T2 }
   }

intersection {
   cylinder {<5.5,0,5.5>,<5.5,10,5.5>,.25}       //left side, top
   plane { illusion_plane_z2 }
   texture {T2}
   }



Page content copyright 1998 by John M. Dlugosz. Home:http://www.dlugosz.com, email:mailto:john@dlugosz.com