Wavefronts, refraction, and the marching soldiers analogy I am not a physicist, but rather a middle school science teacher. Please be gentle. The marching soldiers has been a really good analogy for explaining why a change of direction is caused by hitting the boundary of a new medium at a non-normal angle. In a pre-Covid time, you could actually have students do this in the classroom. Very fun. Except... what does the pole locking the marchers together represent?
Yes, it's a wavefront, but what makes that wavefront stay together in shape? I've never seen that explained. I think I understand that being in the same phase is what makes that surface of points a wavefront, but is this a descriptive definition or a prescriptive one? What keeps a wavefront together in the same shape, in perpetuity?
Suppose we are in a universe where change in direction does not happen passing through a new medium. We start the marching soldier analogy: Alice is connected to Bob by a pole, and Alice hits the slower medium first because they are approaching the medium-boundary at a non-normal angle. We would then say that holding the same pole as Alice makes Bob slow down too even though he's still in the faster medium because that is the only way to preserve direction— the thing we're observing in this supposed universe. We would just say that of the analogy: the pole does it, they're connected (sharing information about velocity?), so Bob slows down too. But why? Maybe the pole has some property that keeps it from turning, so Bob has to slow down too. Maybe in this universe, the definition of a wavefront— or whatever this universe calls the pole— is the set of all points where the wave stays in the same direction. That does not happen in our universe, so we don't have to answer that.
In our universe, it is still the analogical pole that does it. (Is it possible that saying the "pole does it" is doing too much work in my understanding? Where are the cause and effect happening in the real world as opposed to the analogy?) In our universe, a wavefront is the set of all points in a wave that is at the same phase. Okay. Alice slows down in the new medium, but Bob at the other end of the pole in the faster medium does not, so the pole turns. But why is there a pole? Why is the wavefront staying in phase through its shape when that's just the definition of what the wavefront is? It feels a bit like circular reasoning to me: the wavefront is changing direction because the wavefront... is a set of points in a wave that we observe to be changing direction?
Does this question make any sense?? It is obviously something I don't understand about what a wavefront is... can anybody explain it? Why does being the same phase lock you in shape? It seems like information has to be shared between photons for this to work, so that's my hint that the answer is getting quantum. But please explain it? I am comfortable with pop-sci explanations of quantum electrodynamics, what's the leap I need? Or maybe it's not quantum and it's actually much simpler than I make it out to be?
Essentially, what makes the wavefront a prescriptive thing? The wavefront is a set of points in the same phase, what makes them stay that shape (we also just accept the pole doesn't shrink, bend, or deform in any way) even when a part of it starts changing speed?
 A: As you know, the peaks and troughs of water waves are examples of wavefronts. Wavefronts are lines or surfaces along which particles are oscillating in phase, so asking why a wavefront stays in phase would indeed invite the response 'by definition'. But it would not be illogical to ask why a straight or plane wavefront stays this shape when the wave passes into a new medium.
When we are presented with a good picture of water waves entering shallower water from deeper, across a straight interface, it's easy enough to explain the change in angle of the wavefronts and their getting closer together, in terms of the speed change. It seems perfectly reasonable, given straightness of both the incident waves and the interface, that the refracted wavefronts should also be straight. You can back this up, by noting that the extra time spent in the 'slower' medium is proportional to the distance along the wavefront. This is one sort of 'explanation'.
What my last paragraph has avoided is explaining how incident wavefronts actually travel and get to be the refracted wavefronts. This is more difficult, and invites the general question: how do waves travel, and specifically, how do straight wavefronts travel (in a quasi two dimensional medium)? Answer (a) We represent the wave mathematically and solve the equations that result. Answer (b) (less rigorous) We use Huygens' Principle, which starts by regarding all points on a straight wavefront as acting like 'point sources' and producing circular wavefronts. We then draw an 'envelope' around these 'wavelets'. This is not difficult to apply to refraction; it used to be on A-level syllabuses in the UK. But I'm afraid that a pole that takes an active part, as opposed to merely showing the position of the wavefront, has no analogue in the propagation of real waves, as far as I know.
A: I've already accepted Philip Wood's answer as the answer to my question, but I wanted to post the diagram of Huygens' principle and refraction that helped me understand more of the "how/why" that answers my question. I'm new to Stack Exchange, please let me know if this is bad form.

I find the image to be self-evident, but there is a description of what's happening in the picture from UC-Davis.
Read Philip Wood's answer, but I will say it this way: There is no analog to the pipe. The bending of the light ray seen is a result of the new envelope of the point-source wavelets that are moving at a different speed in the new medium. As this animation implies (watch for when the thick red line appears), there is no pipe or envelope to speak of until the other end of the wavefront also meets the new medium. You could perhaps force the analogy to work by saying the pipe is bent constantly along the length of it until it is straight again but at a new angle. I think that's clumsy though. I've decided that marching soldiers is not an analog at all to WHY refraction occurs, but is a useful thought experiment to show that a changing of angle does occur when media (and therefore velocity) changes gradually along a wavefront.
If you find animation distracting, the following diagram was also helpful to me.

You might be able to imagine the pipe bending down the length until the new envelope is formed a little better on this one. But really, don't imagine that. The pipe is a false analog.
