Original: In thermodynamics , a heat engine performs the conversion of heat energy to mechanical work by exploiting the temperature gradient between a hot '' source '' and a cold '' sink '' .
Simplified: Examples of everyday heat engines include : the steam engine , the diesel engine , and the gasoline ( petrol ) engine in an automobile .