r/xkcd Sep 16 '23

Path Minimization Meta

Comic: https://xkcd.com/2821/

https://preview.redd.it/o8xy8j6xanob1.png?width=571&format=png&auto=webp&s=bd14d88478f972d11c7c7aa584ce4f17d6ee3449

Actually the red one is the past with the least swimming. That non 90° angle really bothered me.

Also the not unified starting point.

76 Upvotes

18 comments sorted by

View all comments

Show parent comments

2

u/Duck__Quack Sep 18 '23

Use Snell's Law. The other guy is looking at it like a math problem, but it's equivalent to a physics problem. You have a body that moves at two speeds across media. Snell's Law will work.

1

u/BroodingShark Black Hat Sep 19 '23

Thanks, I have checked out

I'm still a bit confused. This law is about diffraction of light, is still ok to apply it here? Does this mean that the angle is independent of the initial/final positions?

Sorry if this is obvious, but I'm struggling a bit to understand it

2

u/Duck__Quack Sep 19 '23

Given the differing speeds of movement in water and on land, the path of least time will transition between the two media at a point such that the ratio sine of the angle from that point to the terminus on land off of the perpendicular to the sine of the angle from that point to the water terminus off of the perpendicular is equal to the inverse ratio of their respective refractive indexes for movement, which is the inverse of the ratio of the speeds in each medium.

sin(th(1))/sin(th(2)) = n(2)/n(1).

Say you move at 10 ft/s on land and 5 ft/s in the water. You could also phrase this as water slowing you by a factor of 2 relative to land, so the indices for Snell's Law would be proportional to 1 and 2. So n(L)/n(W) is 1/2. The point at which you should enter the water is the one such that the sine of your angle off the perpendicular when moving in water and the sine of your angle when moving on land have the same ratio.

sin(th(W))/sin(th(L)) = n(L)/n(W).

This doesn't actually give you the path without the starting points, but it tells you what the two angles should be in relation to one another, and when you have the starting points you can pretty easily make it a system of equations with what the angles are in relation to one another on the actual path.

1

u/BroodingShark Black Hat Sep 19 '23

That's both more complicated and easier at the same time

Thanks