Reconciling refraction with particle theory and wave theory I have searched the web for good answers to why refraction occurs when light moves from one medium to another with different density. I have limited background in physics and want to know if there is an easy way to understand this without having to go back to school for years.
Most explanations come in some variant of the "Marching line of soldiers" analogy, where a straight line of soldiers change pace when they hit an boundary. I have no problem understanding the analogy, my problem is understanding how this is even relevant to light. 


*

*The analogy does not work for light as a particle. The particle does not "know" of particles around it, and should follow a straight line. 

*How does a single ray of light (wave), as part of a "wave front" know what other rays are doing? 
 A: Thanks to Marek, for pointing out the lectures given by Richard Feynman in these two videos.
http://vega.org.uk/video/programme/45
and 
http://vega.org.uk/video/programme/46
About half way into the second video he explains the concept of refraction of photons. The lectures can be understood without deep knowledge of physics. You should set aside about 120 minutes. 
A: This is an interesting question in that it is one that involves mostly the understanding of the questioner. A similar question asked by someone who used different terminology would deserve a different answer. The one I'm providing is, I hope, compatible with the understanding of the questioner. It is not a complete explanation of the situation as would be suitable for a physics grad student. With that caveat...

The particle does not "know" of
  particles around it, and should follow
  a straight line.
  In contemporary physics, light is considered as both a particle (the photon) and also a wave (not in the sense of the waves of electricity and magnetism, but instead in the sense of a quantum wave). A quantum wave does know about more than just the classical path.
How does a single ray of light (wave),
  as part of a "wave front" know what
  other rays are doing?

From the way this question is written, I'm assuming that the writer sees light as a sort of classical point particle (whose trajectories would follow "rays"), but with the added feature of being a wave (and therefore having an existence along the ray, as is necessary for a wave to have a definite energy or momentum). The question is sophisticated in that the writer understands that light has wave properties and I'll try to move that understanding a little ways further.
Light (even light that is "classical" that is, that follows Maxwell's laws of electricity and magnetism) does not follow rays. A ray is an idealization that applies only when the width of the ray is large compared to the wavelength of the light.
We could try to create a ray of light more narrow than a wavelength of the light by shining the light on a sheet of copper (or other thin opaque material) with a single hole drilled in it. If we make the hole smaller than the wavelength of light than it stands to reason that the ray that comes out of it will have a diameter smaller than the wavelength of light. But in fact, this is not what happens. Instead, light is scattered by the hole and diverges in all directions.
The effect is similar to what would happen if you had an obstruction to ocean waves but with a single hole in it. Assuming the hole is small compared to the wavelength of the ocean waves, the waves that come through it will not appear as a ray of waves, but instead will spread away from the hole in all directions.
Rather than "refraction" this feature of light is called "diffraction." The wikipedia article on diffraction ( http://en.wikipedia.org/wiki/Diffraction ) has a useful photo of water waves diffracting. Light operates the same way. I've added red lines to show the barrier and green arrows to show the direction that the waves are moving. The wave begins at the bottom left and moves towards the top right:

A: It is important to note that a line of soldiers marching forward change direction inward when they speed up and change direction outward when they slow down, exactly the opposite of what light does. The old Newtonian corpuscular theory of light predicted that light travels faster in glass, which is I suppose why the index of refraction is defined as the reciprocal of what you would expect.
The naive particle theory is incorrect, and the wave theory explains refraction very simply, by matching peaks of waves moving at different velocities on either side of the barrier.
