Black body radiation and spectra lines My understanding was that all objects emit light of continuous spectrum when hot ( black body radiation) but then you see discreet wavelengths in spectra lines and I am confused. I know I am making a mistake somewhere but not able to point it
 A: Black body radiation comes from a large ensemble of particles .  The spectrum depends on the quantum mechanical nature of the underlying frame of particles, but it is a statistical effect that can be calculated , and is one of the reasons that quantum mechanics had to be invented. Classical thermodynamics could not explain the spectrum.


The amount of radiation emitted in a given frequency range should be proportional to the number of modes in that range. The best of classical physics suggested that all modes had an equal chance of being produced, and that the number of modes went up proportional to the square of the frequency.
But the predicted continual increase in radiated energy with frequency (dubbed the "ultraviolet catastrophe") did not happen. Nature knew better.


Spectra are again a quantum mechanical phenomenon, but dependent on the solution of the Schrodinger equation, as can be seen with the fit of the spectra for hydrogen. (the Bohr model was a phenomenological one, before the founding of quantum mechanics as a theory)

All spectral lines come from transitions between energy levels of individual atoms and molecules bound states. In a hand waving sense, the black body radiation is also due to transitions between energy levels in the lattices of the bodies, but these are dense enough to become a continuum, as the approximation of the black body radiation shows, fitting the black body spectrum.
A: You need to multiply the blackbody spectrum with the absorptivity (= emissivity according to Kirchhoff's law) at every wavelength. When the absorptivity of a gas or solid is zero at some wavelength, it won't glow at that wavelength.
A: The emissions and absorptions of the molecules are discrete.
What makes the black body spectrum continuous is the
projection of random directions of an arbitrary number n of molecules
to the direction of observation.
This is done with the Boltzmann statistics.

Here a more detailed picture:
The Planck law gives the number of photons in the direction of the observer
per area normal to the direction.
So, what matters is just the direction of the observer.
Velocities alone are physically invisible,
i.e. they have no effect.
But due to the collisions in the 3D volume
the molecule velocities change.
Collision is an inappropriate macroscopic word,
because there is no contact between the molecules.
What matters is just the change of velocity with respect to the observer
that results from an interaction of whatever kind.
Due to the projections from many directions into the direction of the observer
many different accelerations and decelerations occur.
Accelerations are physical events,
because they are a changes of state,
while velocities alone are just a state.
Let's call the change of state an event.
Lets assume a constant rate of causal events given by $h$.
The constancy is per inertial frame
and includes all causally linked events over all physical levels.
Per molecule, acceleration events change the orbital events in the molecule
to keep a constant $h$ with respect to the observer.
A slow down by $ΔEΔt=hν$ creates an $hν$ photon.
$ν$ counts the "inner photon events" in our macroscopic time unit.
The emissions and absorptions of the molecules are discrete.
What makes the black body spectrum continuous is the
projection of random directions of an arbitrary number $n$ of molecules
to the direction of observation.
This is done with the Boltzmann statistics.
For the Boltzmann statistics,
we express the acceleration rate with respect to $kT$.
In $r = \frac{hν}{kT}$ our macroscopic unit of time cancels out.
We divide by $λ²$, because
the Planck law is the average number of $hν$ photons per area
in the direction of the observer.
Multiplication by $2$ is because 2 vectors in a circle are projected to the same vector along the direction to the observer, which leads to different photon polarization.
$$
B = \frac{2}{λ²}\frac{kTrΣn e^{-nr}}{Σe^{-nr}} = \frac{2}{λ²}\frac{kTr}{e^r - 1} 
= \frac{2}{λ²}\frac{nν}{e^{nν/kT} - 1}
$$
Here we did a series collapse ($x=e^{-r}$)
$$
1+x+x²+...    = \frac{1}{(1-x)} \\
x+2x²+3x³+...  = \frac{x}{(1-x)²}
$$
