The virial theorem states 2⟨K⟩ + ⟨V⟩ = 0 in a gravitationally bound equilibrium, where K is kinetic energy and V is potential energy. When a gas cloud radiates and loses energy E = K + V, it paradoxically heats up (negative heat capacity): losing energy makes K increase and T rise. This simulation shows N-body gravitational collapse under softened gravity, tracking the ratio 2K/|V| → 1 as the system virializes.