What two rock types are formed by the transfer of heat?