// Prism, POV 2.2 (but any version should work) // See if light source bends inside glass (answer is "no!") -- one of those // things you always want to try, but never get around to // John Kalstrom, johnk@smartstar.com, Oct 94 // Perhaps the ray is only shifted on one side of the glass, to save time? // (And camera is looking in at 90 degrees to the surface, so no shift.) // And perhaps the ray being traced doesn't actually get traced back to the // light source from the "paper", because "diffuse" is handled differently? #include "colors.inc" #include "textures.inc" camera { location <-1, -1, -5> look_at <2, 2, 0> // location <0, 2.5, -1> // look_at <0, 2.5, 0> } // Light (need lots, as cylinder blocks most of it) light_source { <0 0 0> color rgb<8 8 8> translate <-14.5, 17, 1> } // Cylinder to collimate light object { cylinder { <-0.5, 3, 1> <-14.5, 17, 1> 0.1 open } texture { pigment {color Pink} finish {ambient 0.5}}} // Prism front (low index of refraction) intersection { box { <0 0 0> <4 4 0.5> } object { plane { <1, 1, 0>, 4*.707 } } texture { Glass pigment { quick_color Yellow } finish {ior 1.5 ambient 0.3} } } // Prism back (high index of refraction) // This ought to show for sure whether there's a difference, even if there // are weird perspective effects from camera location intersection { box { <0 0 0.5> <4 4 1.0> } object { plane { <1, 1, 0>, 4*.707 } } texture { Glass pigment { quick_color Yellow } finish {ior 10 ambient 0.3} } } // Sheet of paper inside & outside prism, to show light path object { box { <6, -3, 0.999> <-0.5, 4.5, 1.001> rotate <2 2 0> } texture { pigment {color White} finish {ambient 0.15 diffuse 0.99} } } // prism.pov