1require_relative "../physics"23question :bending_at_forty do4 kind :scq5 describes "Light in air meets water at %{angle} to the normal. What is the angle of refraction?"6 given angle: "40 deg"78 option 28.9.deg9 option 40.0.deg10 option 58.77.deg11 option 50.0.deg12end
1require_relative "../questions/bending_at_forty"2require_relative "../science/ray_optics_and_optical_instruments/refraction"3require_relative "../science/ray_optics_and_optical_instruments/refractive_media"45solve :bending_at_forty, using: Refraction do6 objects :light, :air, :water7 light.goes(:incident, through: air)8 light.goes(:refracted, through: water, after: incident)9 take angle: light.angle_to_the_normal(during: incident)10 deduce_from "air", air.refractive_index => REFRACTIVE_MEDIA.fetch("air")11 deduce_from "water", water.refractive_index => REFRACTIVE_MEDIA.fetch("water")12 answer find_value(light.angle_to_the_normal(during: refracted), in: "deg")1314 conclusion "Going into the denser medium the ray bends toward the normal, so it comes out at a " \15 "smaller angle than it went in at."16end
1require_relative "../solutions/bending_at_forty"2require_relative "../pictures/light"34play_with :bending_at_forty do5 title "Bending at 40°"67 draw Light::Picture do8 media "air", "water"9 ray "incident", arriving_at: :i, angle: true, extended: true10 end11end