1require_relative "../physics"23question :share_of_the_sky do4 describes "%{solid_angle} does a patch of area %{area} cover, seen from %{radius} away?"5 given :area6 given :radius7 asks solid_angle: "How much of the sky"8end
1require_relative "../questions/share_of_the_sky"2require_relative "../science/units_and_measurement/units"34solve :share_of_the_sky, using: Units do5 take area: :A, radius: :r6 take solid_angle: :Omega7 find_value :solid_angle89 conclusion "Its area over the square of how far away it is: Ω = A ⁄ r². Like the radian, the " \10 "steradian is a pure number, and the whole sky around a point is 4π of them."11end
1require_relative "../solutions/share_of_the_sky"23play_with :share_of_the_sky do4 title "A Share of the Sky"56 input :A, 0.0..100.0, step: 0.5, default: 4.0, as: "area in square metres"7 input :r, 0.5..10.0, in: "m", step: 0.1, default: 2.0, as: "distance"89 output :Omega, as: "solid angle in steradians"10end