-- Draw black-body spectrum for 3000 Kelvin -- rho is Planck's law rho = (2 h nu^3 / c^2) / (exp(h nu / (k T)) - 1) T = 3000 kelvin c = 299792458 meter/second h = 6.62607004 10^(-34) joule second k = 1.38064852 10^(-23) joule/kelvin hertz = 1/second joule = kilogram meter^2 / second^2 "x axis: frequency in hertz" "y axis: joules per square meter (radiant exposure)" -- y cancels physical units so rho can be drawn y = eval(rho,nu,x hertz) meter^2 / joule y xrange = (0,10^15) yrange = (0,10^(-8)) draw(y,x)
Run