Ideal gas P-V diagram: work, energy, and heat in a cyclic process