Why aren't gas planets and stars fuzzy? The edge of Jupiter looks very sharp.

Even more bothersome, the edge of the sun looks sharp, aside from kind of a soup of particles floating above it.

The sun's surface has an incredibly low density.  I mean, $10^{-6} g/cm^3$ kind of density (ref).  The Earth's atmosphere looks very hazy, and rightly so, because it's a gas.

Since Jupiter and the sun are 100% gas, why don't they appear as smudges on our telescopes?  To say "smudge" in a more scientific way, why isn't the transition zone between opacity and transparency a significant fraction of the radii of gaseous bodies?
 A: I'll do the math here.  Let's imagine a gravitationally bound ball of Hydrogen in space.  If we're on the periphery then we're pretty correct in taking the acting gravitation field to be constant.  This is mostly correct for Earth's atmosphere as well as anywhere near the surface of the sun.
Then we'll do isothermal assumption, this might be close to reality for some of our outer gas planets.  It makes the state equation $P =R_{specific}T \rho$, which I'll denote $P=R_T \rho$.  We're left with a differential equation.  For the boundary condition we'll start at the edge of the opaque region, position $R$, and denote the pressure there $P_0$.
The differential equation comes from the hydrostatic balance.  This is a $\Delta P=\rho g \Delta h$ analog.  Approximating the gravitational field as constant gives an exponential function.
$$ \frac{dP}{dr} = - \rho(r) g(r) = - \frac{ P(r)}{R_T} g$$
Let's then imagine that whatever emission or reflection process we're talking about requires a certain mass-thickness of gas, $\mu$.  This layer technically extends out to infinity.  Observe that the pressure at $R$ is given by the gravitational field times the mass thickness above it so $P_0=\mu g$, but it turns out we don't need that.  Let $\delta = r-R$ as a more convenient radial coordinate.
$$ P(r) = P_0 e^{ - \frac{ g}{R_T} \delta }  $$
It should be apparent that the fuzzy layer doesn't terminate at a defined point, but we can look to a metric for a sort of half-thickness of it, which I will write $\Delta r = \ln{(2)} / (g/R_T)$.  This is our best metric for the "thickness" of the photosphere.
To prove that that gas giants should, in fact, not be fuzzy, it would be sufficient to show $\delta$ is small relative to $R$.  We could do that, or we could take the easy way and just show the ratio goes to zero as $R$ gets big.  Either way, we'll write the radio of the thickness of the photosphere to the radius.
$$ \frac{\Delta r}{R} = \frac{ \ln{(2)} / (g/R_T) }{ R } =  \frac{ \ln{(2)} R_T  }{  g R } $$
Within this, we'll have speculate about the gravity, and the total mass of the object by extension.  I'll say it's a given average density, since the observed densities of planets and stars in our own solar system tend to hover around a single order of magnitude of each other.  This is even true for the sun, since high enough gravitational pressure creates another source of outward pressure - fusion.
$$ g = \frac{ M G }{R^2} = \frac{ \rho 4/3 \pi R^3 G}{R^2} = \frac{4 \rho \pi R G }{ 3}$$
$$ \frac{\Delta r}{R}  =  \frac{ 3 \ln{(2)} R_T  }{  4 \rho \pi G R^2 }  $$
Now let's use values.  We will specify Hydrogen gas and a temperature of $300 K$, giving a value for the state equation.
$$ R_T = R_{specific} T = \left( 4,124 \frac{J}{kg K} \right) \left( 300 K \right) = 1.24 \times 10^{6} \frac{J}{kg} $$
For the density I'll use $3 g/cm^3$.  I felt strongly that the mass thickness should be required, but the equations disagreed with me, and finally I seem to have convinced myself that we don't need it.  Consider that if the required mass thickness changed, the radius that defines the photosphere would also change.  Since we assume to know the radius, it just doesn't come into play.
At this point we can calculate.  I will report the photosphere thickness to radius ratio for different masses, as mass is the only variable left.


*

*Earth - 0.25%

*Jupiter - 0.02%

*the Sun - 0.0002%


How convincing is this?  The atmosphere of the Earth drops pressure by 1/2 sea level at about $6 km$, which compares to a radius of about 1000x that, leading to an expected value of 0.1%... but I assumed Hydrogen and the atmosphere isn't Hydrogen, so it sounds pretty spot-on.  Note that this does not suggest that the photosphere of the Earth could be $6 km$ of our current atmosphere, but instead that if the ground wasn't there (the planet wasn't rocky), then as you descended below sea-level pressure, half of the required mass-thickness for the photosphere would be located within a region of $6 km$ somewhere down there.
The formula I found seems to be consistent with the empirical evidence we are seeing here.
A: Oh, but the edge of the atmopheres of Jupiter and Saturn (and the others) are fuzzy!  Look at these Cassini images from a few years ago, at the CICLOPS website:  "Adrift at Saturn" (PIA 07667), "Beyond the Limb" (PIA 10426), "Off Saturn's Shoulder" (PIA 09791)
There is so much gas, such strong gravity, that it gets thicker and thicker quite rapidly as you descend from above.  It's many kilometers, but small compared to the whole planet, where the gas is so thick you can't see through it.  The density of an atmosphere above ground, or lacking that, above some convenient reference point, is often approximated by an exponential function $\rho(z) = A exp(-z/h)$ with A, h constants, z  height, and h the "scale height" which for Saturn is about 60km in altitudes of interest.   
As you scan from outside the limb toward the planet, density goes up, light scattering increases, and the "optical depth", which is how far you can see through the gas, shrinks from infinity to planet-scale to mere kilometers (as in a thin fog) to meters (as in a thick fog).  
We also see refraction in the part of the atmosphere between where it's too thick to see through and too thin to matter:  "Atmospheric Illusion" (PIA 07555) and "Limb Scan" (PIA 10442)
Jupiter has a shorter scale height, so it's harder to see fuzziness at the edges, for exmaple in this famous image "The Greatest Jupiter Portrait" at CICLOPS
