1require_relative "../physics"23question :reflection do4 describes "%{reflected} when it hits a mirror at %{angle}?"5 given :angle6 asks reflected: "Where does a ray go"7end
1require_relative "../questions/reflection"2require_relative "../science/ray_optics_and_optical_instruments/reflection"34solve :reflection, using: Reflection do5 take angle: :i6 take reflected: :r_l7 find_value :reflected89 conclusion "Back out at the angle it came in at, on the other side of the normal, and all of it goes back."10end
1require_relative "../solutions/reflection"2require_relative "../pictures/light"34play_with :reflection do5 title "Reflection"67 input :i, default: 30.deg89 output :r_l1011 draw Light::Picture do12 mirror13 ray "incident", arriving_at: :i, angle: true14 ray "reflected", leaving_at: :r_l, angle: true15 end16end