how does heat affected matter