Why the straw looks bent.

Light bends at the boundary between two materials — enough to make a straw look broken in a glass of water. Go the other way, past a certain angle, and it stops crossing over at all.

n1 sin θ1 = n2 sin θ2
Angle of incidence θ1 ↑ θ1
measured from the normal, straight down90°
Interface n1, n2
Refraction angle
°
critical angle
Try

Snell's law holds for any pair of transparent materials; refractive indices used here (at visible light, room temperature) are air 1.00, water 1.33, crown glass 1.52, and diamond 2.42. Going from a slower medium into a faster one (water or glass into air, say) has a critical angle: past it, sinθ2 would have to exceed 1, which is impossible, so instead of crossing over the light reflects entirely — this is total internal reflection, the reason an optical fibre keeps its light and a big part of why a cut diamond throws so much light back at you. Real materials disperse — the index depends slightly on wavelength, which is what splits white light into a rainbow through a prism — not modelled here; one representative value is used per material instead.