play phryzby with physics

Refraction: Water to Air

solved Refraction

Q. Light in waterμ1=1.33 meets airμ2=1 at i. Which way does it bend coming out?

waterairnormalincident45.0°refracted70.1°
Inputs
i
45.00°
Outputs
angle of refractionrr70.13°
no refracted ray?no

How it's solved

Solved with Refraction

Given

  • μ1=1.33 from “water”
  • μ2=1 from “air”
  • i yours to vary

Find rr, whether there is no refracted ray.

Working
  1. snells lawμ1⋅sin⁡i=μ2⋅sin⁡rr
  2. 1.33⋅sin⁡45°=1⋅sin⁡rr
  3. rr=70.13°
  4. snells law when grazing exitμ1⋅sin⁡c=μ2⋅sin⁡90°
  5. 1.33⋅sin⁡c=1⋅sin⁡90°
  6. c=48.75°
  7. no refracted ray?i>cno
Conclusion

It bends away from the normal instead, and far enough round there is no way across at all.

The web of concepts

given read from the words equation asked

The Ruby that solves it

The question and its solution are small Ruby files. The engine runs them.

question.rb
1require_relative "../physics"23question :water_to_air do4  describes "Light in water meets air at %{angle}. %{refracted}?"5  given :angle6  asks refracted: "Which way does it bend coming out"7end
solution.rb
1require_relative "../questions/water_to_air"2require_relative "../science/ray_optics_and_optical_instruments/refraction"3require_relative "../science/ray_optics_and_optical_instruments/refractive_media"45solve :water_to_air, using: Refraction do6  take angle: :i7  deduce_from "water", mu_1: REFRACTIVE_MEDIA.fetch("water")8  deduce_from "air", mu_2: REFRACTIVE_MEDIA.fetch("air")9  take refracted: :r_r10  find_value :refracted11  find_whether :no_refracted_ray?1213  conclusion "It bends away from the normal instead, and far enough round there is no way across at all."14end
playground.rb
1require_relative "../solutions/water_to_air"2require_relative "../science/ray_optics_and_optical_instruments/refractive_media"3require_relative "../pictures/light"45play_with :water_to_air do6  title "Refraction: Water to Air"78  input :i, default: 45.deg910  output :r_r11  output :no_refracted_ray?, alarm: true1213  draw Light::Picture, rising: true do14    media "water", "air"15    ray "incident",  arriving_at: :i,  angle: true, extended: true16    ray "refracted", crossing_at: :r_r, angle: true, unless: :no_refracted_ray?17    note "no refracted ray", when: :no_refracted_ray?18  end19end
The laws it drew on
quantitywrittenunitswithinfrom
angle to the normalθ—0 … 1.571Incidence
angle of incidencei—0 … 1.571Incidence
refractive indexμ——Refraction
angle of refractionrr—0 … 1.571Refraction
refractive index of first mediumμ1——Refraction
refractive index of second mediumμ2——Refraction
critical anglec—0 … 1.571Refraction
i≡θi(before)
angle of incidence
rr≡θi(after)
angle of refraction
μ1≡μb
refractive index of first medium
μ2≡μa
refractive index of second medium
μ1⋅sin⁡i=μ2⋅sin⁡rr
snells law
μ1⋅sin⁡c=μ2⋅sin⁡90°
snells law when grazing exit
rr=90°
grazing exit?
i>c
no refracted ray?
rr<i
bends toward the normal?
rr>i
bends away from the normal?